[swift-evolution] [Review] Require self for accessing instance members

Alejandro Martinez alexito4 at gmail.com
Wed Dec 16 14:33:27 CST 2015


I've been following the thread for some days and being the community quite separated in this makes it a hard decision. 

Honestly I've been using self. in my Swift code most of the time, for me it makes things more explicit and removes any confusion that can happen. That said, I say "most of the time" because is really true that it feels nicer to not include it. 

I would like to point out that being explicit is not necessary a bad thing, as Swift already force us to being explicit in some ways (optionals, throws, etc) as the proposal says, but specially that, IMHO, we should not decide if things that affect directly the code that we write and, specially, read should be omitted because another tool makes it obvious. In other words, that an IDE colorizes the text is not enough to discard it. We read a lot of code from the internet, specially PR, and we can not rely on having always an IDE to make things explicit.

That said, seeing that the community is so separated in this and that the language doesn't enforce it already (which looks like the core team didn't think that it that important for being part of the core language) I would say that having this enforced by a linter or a compiler warning (that can be disabled) may be enough. 

Sorry for not having a stronger opinion, but I wanted to add my opinion to the review ;)

PS: I agree that maybe the proposals should contain more of the opinions in the mailing list, at least in cases like this that have been so many mails and not everyone can keep up with it. Cheers.


> El 16 dic 2015, a las 18:55, Douglas Gregor via swift-evolution <swift-evolution at swift.org> escribió:
> 
> Hello Swift community,
> 
> The review of “Require self for accessing instance members” begins now and runs through Sunday, December 20th. The proposal is available here:
> 
> 	https://github.com/apple/swift-evolution/blob/master/proposals/0009-require-self-for-accessing-instance-members.md <https://github.com/apple/swift-evolution/blob/master/proposals/0009-require-self-for-accessing-instance-members.md>
> 
> Reviews are an important part of the Swift evolution process. All reviews should be sent to the swift-evolution mailing list at
> 
> 	https://lists.swift.org/mailman/listinfo/swift-evolution <https://lists.swift.org/mailman/listinfo/swift-evolution>
> 
> or, if you would like to keep your feedback private, directly to the review manager.
> 
> What goes into a review?
> 
> The goal of the review process is to improve the proposal under review through constructive criticism and, eventually, determine the direction of Swift. When writing your review, here are some questions you might want to answer in your review:
> 
> 	* What is your evaluation of the proposal?
> 	* Is the problem being addressed significant enough to warrant a change to Swift?
> 	* Does this proposal fit well with the feel and direction of Swift?
> 	* If you have you used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?
> 	* How much effort did you put into your review? A glance, a quick reading, or an in-depth study?
> 
> More information about the Swift evolution process is available at
> 
> 	https://github.com/apple/swift-evolution/blob/master/process.md <https://github.com/apple/swift-evolution/blob/master/process.md>
> 
> 	Cheers,
> 	Doug Gregor
> 	Review Manager
> 
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151216/9953d265/attachment.html>


More information about the swift-evolution mailing list