<div dir="ltr"><div class="gmail_default"><div class="gmail_default"><font face="georgia, serif">let Foo:SomeEnum = .Bar</font></div><div class="gmail_default"><font face="georgia, serif">let Bar:SomeEnum = .Foo</font></div><div class="gmail_default"><font face="georgia, serif"><br></font></div><div class="gmail_default"><font face="georgia, serif">enum SomeEnum {</font></div><div class="gmail_default"><font face="georgia, serif"> case Foo</font></div><div class="gmail_default"><font face="georgia, serif"> case Bar</font></div><div class="gmail_default"><font face="georgia, serif"> func demoDotAndNoDot() {</font></div><div class="gmail_default"><font face="georgia, serif"> switch self {</font></div><div class="gmail_default"><font face="georgia, serif"> case .Foo: print("This has the usual dot before the case name.")</font></div><div class="gmail_default"><font face="georgia, serif"> case .Bar: print("This has no dot, which is ok, at least in this particular context.")</font></div><div class="gmail_default"><font face="georgia, serif"> }</font></div><div class="gmail_default"><font face="georgia, serif"> }</font></div><div class="gmail_default"><font face="georgia, serif">}</font></div><div class="gmail_default"><font face="georgia, serif"><br></font></div><div class="gmail_default"><font face="georgia, serif">above code works in current Swift. It will not work after your changes.</font></div><div class="gmail_default"><font face="georgia, serif"><br></font></div><div class="gmail_default"><font face="georgia, serif">zhaoxin</font></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jan 16, 2016 at 6:44 AM, 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><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>enum SomeEnum {</div><div> case Foo</div><div> case Bar</div><div> func demoDotAndNoDot() {</div><div> switch self {</div><div> case .Foo: print("This has the usual dot before the case name.")</div><div> case Bar: print("This has no dot, which is ok, at least in this particular context.")</div><div> }</div><div> }</div><div>}</div><div><br></div><div>I'm just throwing this out in case someone should feel like writing a formal proposal to remove the dotless form.</div><div><br></div><div><div>I'd be ok with removing it since it only works in some specific contexts. </div></div><span class="HOEnZb"><font color="#888888"><div><br></div><div>/Jens</div><div><br></div><div><br></div></font></span></div>
<br>_______________________________________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org">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></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><br>Owen Zhao<br></div></div></div>
</div>