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

Pelaia II, Tom pelaiata at ornl.gov
Wed Apr 20 12:36:32 CDT 2016

I like this proposal, but my only hesitation is using “Self” from within the context of an instance method. That just doesn’t seem write for two reasons:
1) “Self" differs from “self” by just the first letter being capitalized. Regardless of case, it is confusing for the terms “self” or “Self” or “SELF” to mean different things from within the same context.
2) It makes the code harder to read by having “Self” and “self” mean two different things.

I’d accept the proposal as is, if instead a different term were used, such as “Type”. If you use “Type” from the context of an instance method there is not ambiguity in its meaning and the code would be more readable.

More information about the swift-evolution mailing list