[swift-evolution] [Discussion] Enum Leading Dot Prefixes
T.J. Usiyan
griotspeak at gmail.com
Sat Feb 13 12:02:51 CST 2016
The honest and lazy truth? Muscle memory. I type `case .<Foo>` much more
than `case <Foo>` so I tend to pause during declaration more often than I
would like. I can let it go now that I have floated the idea but that was
the reason I pitched it.
TJ
On Fri, Feb 12, 2016 at 10:57 AM, Erica Sadun via swift-evolution <
swift-evolution at swift.org> 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> 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
>
>
>
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160213/dda48b9c/attachment.html>
More information about the swift-evolution
mailing list