Hi all,<br><br>I&#39;ve been following the thread from the beginning and some great arguments have been layed out. As far as I understand, this proposal would lead to fewer correctness bugs (referring to a different variable due to implicit self, has happened to me twice in the last couple of months, was very hard to track down). <br><br>The disadvantages of this are only verbosity. But, from the design principles of Swift (as I understand them), correctness is preferred over making the language concise, especially when those two are in conflict, just like here. <br><br>I support the proposal, because it would lead to fewer bugs at only the cost of extra few characters. Again, I&#39;ve been bitten by implicit self a couple times before and those bugs are hard to track down. And the readability of the code in code reviews, to me, is another huge advantage, possibly leading to more correctness bugs caught early. <br><br>I understand and appreciate the disadvantages, but again, I believe we should prefer correctness over conciseness, as explicitly stated by the Swift design principles. <br><div class="gmail_quote"><div dir="ltr">On Tue, Dec 15, 2015 at 11:28 PM Slava Pestov via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
<br>
I don&#39;t see anyone lay out how this proposal can interact with nested types and such. There&#39;s a fair amount of complexity in Swift with what you can do by nesting things inside of each other, so the simple conceptual model of &quot;locals are unqualified, instance variables have a self. prefix&quot; doesn&#39;t seem to generalize.<br>
<br>
Will I need to qualify associated types with the protocol or type name to refer to them? What about generic type parameters, they&#39;re sort of like &quot;instance variables&quot; too.<br>
<br>
What about class methods that want to call each other? Do they need the explicit &#39;self&#39;, or an explicit class name prefix? The latter changes semantics if the class method is overridden in a subclass.<br>
<br>
If we ever add the ability for an inner type to capture stored properties from the outer type, how do you reference properties of the outer type? I guess the problem has to be solved anyway to refer to an outer &quot;self&quot; explicitly, but qualifying everything with OuterType.self.foo kind of defeats the purpose of inner types altogether.<br>
<br>
I&#39;m not sure I buy the readability arguments in favor of this approach. It seems the languages where explicit &#39;self&#39; was adopted did it mostly by accident, or because of implementation concerns. In Python for instance, there&#39;s no way for assignment to modify a binding in an outer scope, so &#39;foo = bar&#39; always sets a local named &#39;foo&#39;, IIRC. So explicit self is needed there. Greg Parker explains earlier in this thread by explicit self was chosen for Objective-C, and it wasn&#39;t readability.<br>
<br>
Slava<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>
</blockquote></div>