<div dir="ltr">+1 for this proposal.<div>/Jens</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 12, 2016 at 8:18 PM, Jordan Rose 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 style="word-wrap:break-word"><div>Ah, I misread that as you wanting to <i>enforce</i> it rather than <i>allow</i> it! I'm with Joe; we can just consider that a bug. Mind filing it on <a href="http://bugs.swift.org" target="_blank">bugs.swift.org</a>?</div><div><br></div><div>Jordan</div><div><div class="h5"><br><div><blockquote type="cite"><div>On Feb 12, 2016, at 10:24, David Waite <<a href="mailto:david@alkaline-solutions.com" target="_blank">david@alkaline-solutions.com</a>> wrote:</div><br><div><div style="word-wrap:break-word">I think you may have misunderstood - I’m asking if we can make your switch example into legal code :-)<div><br></div><div><div style="margin:0px;font-size:14px;line-height:normal;font-family:Menlo"><span style="color:#c32275">var</span> point = <span style="color:#703daa">CGPoint.zero</span></div><div style="margin:0px;font-size:14px;line-height:normal;font-family:Menlo;min-height:21px"><br></div><div style="margin:0px;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(195,34,117)">switch<span> </span><span style="color:#539aa4">point</span><span> {</span></div><div style="margin:0px;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(29,148,33)"><span style="color:#c32275">case</span><span> .zero: </span>// Error: Enum case 'zero' not found in type 'CGPoint'</div></div><div><br></div><div>-DW</div><div><br><div><blockquote type="cite"><div>On Feb 12, 2016, at 10:57 AM, Jordan Rose <<a href="mailto:jordan_rose@apple.com" target="_blank">jordan_rose@apple.com</a>> wrote:</div><br><div><div style="word-wrap:break-word"><br><div><blockquote type="cite"><div>On Feb 11, 2016, at 22:27 , David Waite via swift-evolution <<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>> wrote:</div><br><div><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">Would it be worthwhile to expand this (or create another proposal) to deal with switch cases only allowing dot syntax for use with enum cases?</span><br></div></blockquote><br></div><div>I would be against that. I like being able to use static members with shorthand.</div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>textField.font = .systemFontOfSize(48)</div></blockquote><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>switch point {</div><div>case .zero:</div><div> print("origin")</div><div>case _ where point.x < 0:</div><div> print("negative x")</div><div>default:</div><div> print("uninteresting")</div><div>}</div></blockquote><div><br></div><div>Jordan</div></div></div></blockquote></div><br></div></div></div></blockquote></div><br></div></div></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">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>