[swift-evolution] [Pitch] Adding a Self type name shortcut for static member access
erica at ericasadun.com
Wed Apr 6 11:51:41 CDT 2016
> On Apr 5, 2016, at 4:04 PM, Joe Groff <jgroff at apple.com> wrote:
>> On Apr 5, 2016, at 3:02 PM, Erica Sadun <erica at ericasadun.com> wrote:
>> As the discussion seems to be quieting down, I've tried to summarize the on-list discussion and distill it into a preliminary proposal draft. Please let me know if this covers what you think it should or if I've entirely missed the mark. (It wouldn't be the first time.)
>> Regards, -- Erica
Pull Request 248: https://github.com/apple/swift-evolution/pull/248 <https://github.com/apple/swift-evolution/pull/248>
Within a class scope, Self means "the dynamic class of self". This proposal extends that courtesy to value types, where dynamic Self will match a construct's static type, and to the bodies of class members, where it may not. It also introduces a static variation, #Self that expands to static type of the code it appears within.
This proposal was discussed on the Swift Evolution list in the [Pitch] Adding a Self type name shortcut for static member access <http://thread.gmane.org/gmane.comp.lang.swift.evolution/13708/focus=13712> thread.
Thanks, -- E
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution