<div dir="ltr"><div>-1 from me on this one. I agree with Nick. IMO forcing self would actually make the code less readable with a sea of Selfs all over the place. `Self` blindness. This is not something that should be forced but something that a linter should `enforce` per project or organization depending on their style guide. If anything, I'd like a linter to tell me when I am declaring self and self is not being captured. </div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Dec 6, 2015 at 4:55 PM, Nick Shelley via swift-evolution <span dir="ltr"><<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I like that self is only required in closures because it serves as a good reminder that there are memory and safety implications with using self in a closure, such as creating retain cycles or having the closure run after self has been deallocated.<br><div><br></div><div>I can't seem to find an official Apple Swift style guide, but github's (<a href="https://github.com/github/swift-style-guide" target="_blank">https://github.com/github/swift-style-guide</a>) suggests only using self in closures with the rationale: "This makes the capturing semantics of self stand out more in closures, and avoids verbosity elsewhere."</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Sat, Dec 5, 2015 at 3:16 AM, Yichen Cao <span dir="ltr"><<a href="mailto:ycao@me.com" target="_blank">ycao@me.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div style="word-wrap:break-word">Teaching wise, its much less confusing for self to be required so students don't mix up instance properties and local vars. Especially when self is required in closures, it confuses students. If self is mandatory for all instance properties, it would be so much clearer and much easier to read.<br><div>
<br><span style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;display:inline!important;float:none">Yichen</span>
</div>
<br><div><blockquote type="cite"><div>On Dec 5, 2015, at 18:11, <a href="mailto:swift-evolution-request@swift.org" target="_blank">swift-evolution-request@swift.org</a> wrote:</div><br><div><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">Re: Proposal: Re-instate mandatory self for</span><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:pre-wrap;word-spacing:0px">        </span><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">accessing</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important"> instance properties and functions (David Hart)</span></div></blockquote></div><br></div><br></div></div>_______________________________________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br>
<br></blockquote></div><br></div>
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=OWK4tSasaK2n-2FQIIcS9Ug-2FuFXG-2BJ3z6cFMLgm306hDdsjyFI4EuF1vQiD1acoCLVpDJzQcqSU7b7fzRoplM25iCZvBrGPhO3zUoQOuwrVN2dVnatdAMO6Sweb091kz4RnhU-2FC8QnKJJJ-2BYqJ-2BgUOOC-2FqbsTzRIMEvX7WWGgR1i4RmNEoELeaPZ4bZVNHfwRcOAEJx-2FC6ZMJnPsXHFdJWzGwaqNz4uhsLAOt3gDjXNuk-3D" alt="" width="1" height="1" border="0" style="min-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">
<br>_______________________________________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br>
<br></blockquote></div><br></div>