<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">While I acknowledge the issues raised by the proposal, I don’t think they're crucial enough to warrant changing the language.</div><div class=""><br class=""></div><div class="">One concern is that I expect people would simply sidestep the requirement by getting all their accesses through self out of the way early, as they do in Objective-C:</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>// Store a bunch of local variables to the stuff we want to work with.</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>let alpha = self.alpha</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>let beta = self.beta</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>let gamma = self.gamma</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>var results = self.results</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>// Actually do the work we wanted to do.</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>let result = calculateResultWithAlpha(alpha, beta: beta, gamma: gamma)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>results.append(result)</div><div class=""><br class=""></div><div class="">As in Objective-C, these preambles can be mildly annoying to read and write, depending on your temperament. More importantly, a bug exists in the example: the results array is a copy, so the calculated result doesn’t get appended to the instance variable as intended. The proposal trades one set of potential gotchas for another, as modifications to internal value types would require either always accessing them through self or remembering to propagate local changes to their respective instance variables at the end of work.</div><div class=""><br class=""></div><div class="">Good points can be made by both sides in favor of preferring a particular style, while no sufficiently persuasive points have yet been made for changing the language to prohibit either one. Thus—like tabs versus spaces or eating bread buttered-side up or buttered-side down—I think this is a style choice better enforced at the project level.</div><div class=""><br class=""></div><div class="">Preston</div><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 16, 2015, at 11:55 AM, Douglas Gregor via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hello Swift community,<div class=""><br class=""><div class="">The review of “Require self for accessing instance members” begins now and runs through Sunday, December 20th. The proposal is available here:</div></div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space: pre;">        </span><a href="https://github.com/apple/swift-evolution/blob/master/proposals/0009-require-self-for-accessing-instance-members.md" class="">https://github.com/apple/swift-evolution/blob/master/proposals/0009-require-self-for-accessing-instance-members.md</a></div><div class=""><br class=""></div><div class=""><div class="">Reviews are an important part of the Swift evolution process. All reviews should be sent to the swift-evolution mailing list at</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space: pre;">        </span><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a></div><div class=""><br class=""></div><div class="">or, if you would like to keep your feedback private, directly to the review manager.</div><div class=""><br class=""></div><div class="">What goes into a review?</div><div class=""><br class="">The goal of the review process is to improve the proposal under review through&nbsp;constructive criticism and, eventually, determine the direction of Swift. When&nbsp;writing your review, here are some questions you might want to answer in your&nbsp;review:<br class=""><br class=""><div class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>*&nbsp;What is your evaluation of the proposal?<br class=""></div><div class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>*&nbsp;Is the problem being addressed significant enough to warrant a change to&nbsp;Swift?<br class=""></div><div class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>*&nbsp;Does this proposal fit well with the feel and direction of Swift?<br class=""></div><div class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>*&nbsp;If you have you used other languages or libraries with a similar feature, how do&nbsp;you feel that this proposal compares to those?<br class=""></div><div class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>*&nbsp;How much effort did you put into your review? A glance, a quick reading, or&nbsp;an in-depth study?<br class=""></div><br class=""></div><div class="">More information about the Swift evolution process is available at</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space: pre;">        </span><a href="https://github.com/apple/swift-evolution/blob/master/process.md" class="">https://github.com/apple/swift-evolution/blob/master/process.md</a></div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>Cheers,</div><div class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>Doug Gregor</div><div class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>Review Manager</div></div>
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=QbaQMOlpXJDJzf0zISqTPXdJICPOLbBcUWzfCpmDLUHr1mz7qdAFiuWpqhvhXO7D-2BpQD63MTycBI8AcFMq2LV9i0CBGApmttcr-2BUSIiZT3oHYj26bSgxPqZsQGDvc-2FWo6dUgzNgyZKeHGOnnfx4RSbC-2BWTpRXgY22pdQAxSFuESGuFBXHbfuVQYG6E82RgiRp484Q-2BrIP6vP3PwPS-2B2DbXcGGmWpDB1OkufsnTsd0XQ-3D" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;" class="">
</div>
_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></body></html>