[swift-evolution] [Discussion] Enum Leading Dot Prefixes

Chris Lattner clattner at apple.com
Thu Feb 11 22:28:00 CST 2016


> On Feb 11, 2016, at 7:17 PM, Rob Mayoff via swift-evolution <swift-evolution at swift.org> wrote:
> 
> On Thu, Feb 11, 2016 at 9:00 PM, Erica Sadun via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
> Unlike static members in structures and classes, enumeration cases can be mentioned in initializers and instance methods without referencing a fully qualified type.
> 
> Why not go the other way then and allow instance methods to refer to static members (or class members) directly, without the type name prefix?

As Erica says, this is a worthwhile topic to discuss, but orthogonal from the proposal.  Among other things we’d have to have a way to resolve the conflict that comes up when you have both a static and instance method with the same name (this occurs a few places in ObjC APIs).

-Chris

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160211/07d9a4c1/attachment.html>


More information about the swift-evolution mailing list