[swift-evolution] Proposal: Re-instate mandatory self for accessing instance properties and functions

Honza Dvorsky jan.dvorsky at me.com
Tue Dec 15 16:53:26 CST 2015


Hi all,

I'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).

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.

I support the proposal, because it would lead to fewer bugs at only the
cost of extra few characters. Again, I'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.

I understand and appreciate the disadvantages, but again, I believe we
should prefer correctness over conciseness, as explicitly stated by the
Swift design principles.

Honza

(sorry for the possible duplication, having some problems with my email
client :))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151215/8aaa4054/attachment.html>


More information about the swift-evolution mailing list