[swift-evolution] [Review] SE-0036: Requiring Leading Dot Prefixes for Enum Instance Member Implementations

Howard Lovatt howard.lovatt at gmail.com
Sat Apr 2 16:36:51 CDT 2016


I meant any static member, inferred self or inferred other. So your example
would be unchanged.

On Sunday, 3 April 2016, Brent Royal-Gordon <brent at architechies.com> wrote:

> > As as been pointed out in the past, why not make a leading dot mean
> static (including enum). This would be nice and consistent.
>
> And it would break the common pattern of doing things like:
>
>         string.compare(otherString, options: [.caseInsensitive, .numeric])
>
> Leading dot can only mean one thing; if it means "static member on the
> type of Self", it cannot mean "static member on the inferred type of the
> expression".
>
> Now, what might be nice is if you could say `Self.someCase` or
> `Type.someCase` to access a static member without retyping the type name.
> Alas, we are not so lucky as that.
>
> --
> Brent Royal-Gordon
> Architechies
>
>

-- 
-- Howard.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160403/fd09af42/attachment.html>


More information about the swift-evolution mailing list