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

Carlos Parada carlosparada at me.com
Fri Feb 12 11:09:04 CST 2016


I see your point and I agree. I agree with the proposal as it. Thanks Erica.

— Carlos Parada

> On Feb 12, 2016, at 7:57 AM, Erica Sadun <erica at ericasadun.com> wrote:
> 
> Are there any reasons why it makes sense to add them to the declaration? There's no other place in the language where a member is declared (vs referenced) using a dot prefix so I'd personally lean towards "no". 
> 
> -- Erica
> 
>> On Feb 11, 2016, at 11:41 PM, Carlos Parada <carlosparada at me.com <mailto:carlosparada at me.com>> wrote:
>> 
>> Taking consistency further, should the definition also use dot prefixes? For example:
>> 
>>> enum Coin {
>>>     case .Heads, .Tails
>>>     func printMe() {
>>>         switch self {
>>>         case .Heads: print("Heads")
>>>         case .Tails: print("Tails")
>>>         }
>>>     }
>>> }
>> 
>> — Carlos Parada
> 

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


More information about the swift-evolution mailing list