[swift-evolution] My personal beef with leading-dot syntax
Joe Groff
jgroff at apple.com
Mon Apr 4 21:15:08 CDT 2016
> On Apr 4, 2016, at 6:27 PM, T.J. Usiyan via swift-evolution <swift-evolution at swift.org> wrote:
>
> Is a solution to this actually making the leading dot mean enum lookup, full stop and allowing `Self.foo`? The case that that doesn't cover is static members on a type other than `Self`. I use it to great effect for standard instances of types, so I would appreciate *some* facility to provide that, but it doesn't have to be a leading dot if we can think of a way which is less problematic.
>
> I am simply spitballing here but would
> 1 period for enum look up
> 2 periods for static member lookup
>
> or something similar be a solution? It doesn't use another character or keyword and it makes it clear which feature is being used.
I don't see any reason for a split here. Enum cases *are* static members, they just happen to be the ones people encounter most often.
-Joe
More information about the swift-evolution
mailing list