[swift-evolution] [Review] SE-0068: Expanding Swift Self to class members and value types

Timothy Wood tjw at me.com
Wed Apr 20 22:16:26 CDT 2016


> On Apr 20, 2016, at 10:16 AM, Chris Lattner via swift-evolution <swift-evolution at swift.org> wrote:
> 
> 	* What is your evaluation of the proposal?

+1 — yes, please!

> 	* Is the problem being addressed significant enough to warrant a change to Swift?

Yes, this is a big cleanup of mental overhead when accessing class/static properties and functions that are related to the instance. This avoids the need to confirm, each time you read it, that the name of the receiver is the same as the name of the containing class/struct/whatever, as well as avoiding subtle bugs when refactoring code.

> 	* Does this proposal fit well with the feel and direction of Swift?

Yes, this helps avoid bugs, and shows clear intent. The name of `Self` shows the clear relationship between that and `self` where `dynamicType` does not.
> 	* If you have you used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?

No, but I’ve certainly been annoyed by its lack in other languages…

> 	* How much effort did you put into your review? A glance, a quick reading, or an in-depth study?

A close reading of the proposal and associated threads.

-tim



More information about the swift-evolution mailing list