[swift-evolution] [Pitch] Adding a Self type name shortcut for static member access

Erica Sadun erica at ericasadun.com
Thu Apr 7 09:05:19 CDT 2016


> On Apr 7, 2016, at 6:17 AM, Brent Royal-Gordon via swift-evolution <swift-evolution at swift.org> wrote:
> Having said all this, now that we have `#Self`, I'm wondering if we still want `Self` in value types. The two are *exactly* equivalent in value types as far as I can tell, and `Self` in classes implies dynamic behavior which is not supported by value types. The use of `Self` in class member bodies is a clean win, the existence of `#Self` is a clean win, but I'm not sure we need the value type thing too.

I prefer the consistency that it be available across types without exception more than I care that the functionality is duplicated. Plus if Swift eventually introduces derived value types, it may play a bigger role.

http://thread.gmane.org/gmane.comp.lang.swift.evolution/12644/ <http://thread.gmane.org/gmane.comp.lang.swift.evolution/12644/>
http://thread.gmane.org/gmane.comp.lang.swift.evolution/10652 <http://thread.gmane.org/gmane.comp.lang.swift.evolution/10652>
http://thread.gmane.org/gmane.comp.lang.swift.evolution/153 <http://thread.gmane.org/gmane.comp.lang.swift.evolution/153>

-- E

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160407/0776cb0b/attachment.html>


More information about the swift-evolution mailing list