[swift-evolution] [Review] SE-0036: Requiring Leading Dot Prefixes for Enum Instance Member Implementations
brent at architechies.com
Sat Apr 2 16:24:55 CDT 2016
> 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.
More information about the swift-evolution