<div dir="ltr"><span style="font-size:13px">I'm +1 on this, for the reasons already stated by others, but not as strongly as I was a year ago. I was very worried about this with Swift 1 was first released, but since then, I haven't actually made this mistake, possibly because I'm so paranoid about it.</span><div style="font-size:13px"><br></div><div style="font-size:13px">However, I really wanted to chime in about whether color should be considered a sufficient differentiator. For me, it's much more useful to have a textual differentiator. Perhaps I'm just really bad at memorizing which colors mean what, but when reading code, the fact that instance variables have a different coloring does not help me to read and understand the code. I would sternly advocate that syntax highlighting colors not be used as the basis for the design of this or any language.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 4, 2015 at 3:51 PM, Michael Buckley <span dir="ltr"><<a href="mailto:michael@buckleyisms.com" target="_blank">michael@buckleyisms.com</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'm +1 on this, for the reasons already stated by others, but not as strongly as I was a year ago. I was very worried about this with Swift 1 was first released, but since then, I haven't actually made this mistake, possibly because I'm so paranoid about it.<div><br></div><div>However, I really wanted to chime in about whether color should be considered a sufficient differentiator. For me, it's much more useful to have a textual differentiator. Perhaps I'm just really bad at memorizing which colors mean what, but when reading code, the fact that instance variables have a different coloring does not help me to read and understand the code. I would sternly advocate that syntax highlighting colors not be used as the basis for the design of this or any language.<br><div><div><br></div><div><br></div></div></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 4, 2015 at 3:37 PM, Kevin Ballard <span dir="ltr"><<a href="mailto:kevin@sb.org" target="_blank">kevin@sb.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>
<div><div>Do you use Xcode to edit Swift? Xcode gives a color to properties/methods and doesn't color local variables/arguments. Is that not sufficient to distinguish this? In my experience the color is actually better than seeing the explicit `self.` because the color can be recognized faster than reading a word, and is visible in a high-level "squint" view of the function.<br></div>
<div> </div>
<div>If you're using another editor, well, my best suggestion there is to look into what it would take to integrate SourceKit functionality into that editor for more intelligent coloring :)<span><font color="#888888"><br></font></span></div><span><font color="#888888">
<div> </div>
<div>-Kevin</div></font></span><div><div>
<div> </div>
<div>On Fri, Dec 4, 2015, at 03:29 PM, Colin Cornaby wrote:<br></div>
<blockquote type="cite"><div>+1<br></div>
<div> </div>
<div>I've had a lot of weird things happen that I've traced to mistakes in properties having the same name as function arguments. I've hardly ever had this issue in modern Obj-C.<br></div>
<div> </div>
<div>I'm a little more ok with functions not needing self as it's less likely for those to shadow something like an argument, but I guess the consistency would be nice too.<br></div>
<div><div> </div>
<div>On Dec 04, 2015, at 01:20 PM, David Hart <<a href="mailto:david@hartbit.com" target="_blank">david@hartbit.com</a>> wrote:<br></div>
</div>
<div><blockquote type="cite"><div><div><span>I don't understand the reasoning behind removing the need to access instance properties and functions using self. Swift has always seemed to prefer readability to brevity and the feature makes the distinction between local and instance variables/functions crystal clear. Any good reason I shouldn't go on with the proposition?<br><br>Just as example, my proposition makes the following piece of code illegal:<br><br>```<br>struct FooBar {<br> var foo: String = "foobar"<br><br> func bar() {<br> print(foo) // compiler error<br> print(self.foo) // compiler happy<br> }<br><br> func bar2() {<br> bar() // compiler error<br> self.bar() // compiler happy<br> }<br>}<br>```<br>_______________________________________________<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" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a></span></div>
</div>
</blockquote></div>
<div><img style="min-height:1px!important;width:1px!important;border-top-width:0px!important;border-right-width:0px!important;border-bottom-width:0px!important;border-left-width:0px!important;margin-top:0px!important;margin-bottom:0px!important;margin-right:0px!important;margin-left:0px!important;padding-top:0px!important;padding-bottom:0px!important;padding-right:0px!important;padding-left:0px!important" border="0" height="1" width="1" alt="" src="https://www.fastmailusercontent.com/proxy/0a622f8228c82468856954859f7b17f72f52131d15aba0dfe2aad604cdc7f5e2/8647470737a3f2f25723030323431303e23647e23756e64676279646e2e65647f27766f2f60756e6f35707e6d3148765176786c673171614a7d2236454230345272776e49564e455e4759687670396f624e6835416971525551795265655666357a75567f4549313141795257566c4869564e454f4879694a657774705573414d22364e464439346e623245307d223247435f6f46574d2232453767457731363154795d22324d2236445c4936694d2236457462364d465e6448396d6a7342614a5f4565766a533559394731735d474848424646687250576636333d673d42597735747851765b434d22324b405560747d654154455c4a576561627d22324263534c443833413d414b624a79376671636d4a7666314d23344d23344/open"><br></div>
<div><u>_______________________________________________</u><br></div>
<div>swift-evolution mailing list<br></div>
<div><a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br></div>
<div><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br></div>
</blockquote><div> </div>
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=HDu-2BON2WuckNVJ2U1s3AlFgVD2xwU1HZRuo94MM4tGvhgw3GfbxdopUYqg0-2BMPBu-2BP56NHefqBDfU58GXHFta1wO5l7g63hHdQ7C0TKowJ-2BdkU2H1GXmghA-2BMMrJ5k5NS6s4hnWngWomHIdlPZNSuB2s6N9BwfMn62ECU4ldBygDXsWEdLdpT1hZwLKNHnVLh8-2BPKbIMIVuXzjWtIyIDvPxDhurh1CNM7Hb2W0LZKwA-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">
</div></div></div>
<br>_______________________________________________<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>
</div></div></blockquote></div><br></div>