<div dir="ltr"><div>I wish I had written the title: "Remove dotless form of case names in switch cases".<br></div><div>To clearify: I want the usual form with a dot to stay, and I think the more unusual variant without the dot could be removed to solve the problem demonstrated by Nate's example program and to simplify things (so that there's just one way to write these things (always with a dot before the case name)).</div><div>/Jens</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jan 16, 2016 at 8:23 AM, Charles Constant <span dir="ltr"><<a href="mailto:charles@charlesism.com" target="_blank">charles@charlesism.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">-1<div><br></div><div>I think this would make autocompletion in Xcode more complicated. I like seeing a list of all enum cases when I start typing </div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Fri, Jan 15, 2016 at 5:05 PM, Jens Persson via swift-evolution <span dir="ltr"><<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">I see, I never thought of the case names as being instance-member-like, and I thought it would be simpler to just have one form for the switch cases (the one with a dot before the case name).<div><br></div><div>I don't want the dotless form to be removed if it complicates rather than simplifies the (compiler) code.</div><div><br></div><div>( My mail was a reaction to this tweet / conversation:</div><div><a href="https://twitter.com/UINT_MIN/status/688101066668281856" target="_blank">https://twitter.com/UINT_MIN/status/688101066668281856</a> )</div><div><br></div></div><div class="gmail_extra"><span><br><div class="gmail_quote">On Sat, Jan 16, 2016 at 1:42 AM, Joe Groff <span dir="ltr"><<a href="mailto:jgroff@apple.com" target="_blank">jgroff@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span><br>
> On Jan 15, 2016, at 2:44 PM, Jens Persson via swift-evolution <<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>> wrote:<br>
><br>
> enum SomeEnum {<br>
> case Foo<br>
> case Bar<br>
> func demoDotAndNoDot() {<br>
> switch self {<br>
> case .Foo: print("This has the usual dot before the case name.")<br>
> case Bar: print("This has no dot, which is ok, at least in this particular context.")<br>
> }<br>
> }<br>
> }<br>
><br>
> I'm just throwing this out in case someone should feel like writing a formal proposal to remove the dotless form.<br>
><br>
> I'd be ok with removing it since it only works in some specific contexts.<br>
<br>
</span>This works by normal instance member lookup. Why do you think it should be removed?<br>
<span><font color="#888888"><br>
-Joe<br>
<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div></span><span><font color="#888888">-- <br><div>bitCycle AB | Smedjegatan 12 | 742 32 Östhammar | Sweden<br><a href="http://www.bitcycle.com/" target="_blank">http://www.bitcycle.com/</a><br>Phone: <a href="tel:%2B46-73-753%2024%2062" value="+46737532462" target="_blank">+46-73-753 24 62</a><br>E-mail: <a href="mailto:jens@bitcycle.com" target="_blank">jens@bitcycle.com</a><br><br></div>
</font></span></div>
<br></div></div><span class="">_______________________________________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br>
<br></span></blockquote></div><br></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">bitCycle AB | Smedjegatan 12 | 742 32 Östhammar | Sweden<br><a href="http://www.bitcycle.com/" target="_blank">http://www.bitcycle.com/</a><br>Phone: +46-73-753 24 62<br>E-mail: <a href="mailto:jens@bitcycle.com" target="_blank">jens@bitcycle.com</a><br><br></div>
</div>