<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div></div><div>I still don't understand why we are not simply writing</div><div><br></div><div>let i = switch color {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; case .Red: <span style="background-color: rgba(255, 255, 255, 0);">0xFF0000</span></div><div><span style="background-color: rgba(255, 255, 255, 0);">&nbsp; &nbsp; &nbsp; &nbsp; case .Green:&nbsp;0x00FF00</span></div><div><span style="background-color: rgba(255, 255, 255, 0);">&nbsp; &nbsp; &nbsp; &nbsp; case .Blue:&nbsp;0x00000FF</span></div><div><span style="background-color: rgba(255, 255, 255, 0);">&nbsp; &nbsp; }</span></div><div><br></div><div>No additional keywords, no wondering why different keywords and different syntax is used for something so similar. And not really longer than the alternative proposals (I do not count swapping "case" with "?" to be a gain, especially not if it requires to add a comma after each case).</div><div><br></div><div>-Thorsten&nbsp;</div><div><br></div><div><br>Am 22.12.2015 um 15:31 schrieb Charles Constant via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>&gt;:<br><br></div><blockquote type="cite"><div><div dir="ltr">Just goofing on this a little. What if we called it a "which" statement, instead of a "switch" statement? It's a bit cutesy, but not too verbose, and it makes sense if you read it aloud.<div><br></div><div><div><div><div>let i = which color {</div><div><span class="" style="white-space:pre">        </span>? .Red: 0xFF0000,&nbsp;</div><div><span class="" style="white-space:pre">        </span>? .Green: 0x00FF00,&nbsp;</div><div><span class="" style="white-space:pre">        </span>? .Blue: 0x00000FF</div><div>}</div></div><div><br></div><div><div><div>let i = which boo {</div><div><span class="" style="white-space:pre">        </span>? true: 1,&nbsp;</div><div><span class="" style="white-space:pre">        </span>? false: 0,&nbsp;</div><div><span class="" style="white-space:pre">        </span>? nil: -1</div><div>}</div></div><div><br></div></div></div></div></div>
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=1MXK54sosN3xru3iYcLt0oBZ2w20i49gyogXctgrspcFeBos2cSbOPMy-2FruZANF93GovHqZCaSQWuVeBQmDF154QE-2BS756vazUsGDDEUY3nC4OVvKq-2B4CCXjL0GLMmeCIrrqL34ybhIM4mfEd-2Bksy03TfNCZj3erqdyz1x1UI5U-2FAJBiHEIRFYTy17JmYwjx-2BlwIRNopGW6bYm-2BbDG-2BooVXcG8qiZz2m6xM-2BppTYbso-3D" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;">
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>swift-evolution mailing list</span><br><span><a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a></span><br><span><a href="https://lists.swift.org/mailman/listinfo/swift-evolution">https://lists.swift.org/mailman/listinfo/swift-evolution</a></span><br></div></blockquote></body></html>