[swift-evolution] My personal beef with leading-dot syntax

T.J. Usiyan griotspeak at gmail.com
Mon Apr 4 21:48:34 CDT 2016


Because semantically they seem more like types unto themselves–which is why
I disagree with the lower camel casing but I digress–and the fact that they
are static members seems like an implementation detail more than anything
else.

TJ

On Mon, Apr 4, 2016 at 10:15 PM, Joe Groff <jgroff at apple.com> wrote:

>
> > 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160404/f3bac441/attachment.html>


More information about the swift-evolution mailing list