<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">This is essentially the latest proposal that Paul offered.<div class=""><br class=""><div class="">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Lucida Grande';  font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">Félix</span>
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">Le 22 déc. 2015 à 13:11:37, Thorsten Seitz &lt;<a href="mailto:tseitz42@icloud.com" class="">tseitz42@icloud.com</a>&gt; a écrit :</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="content-type" content="text/html; charset=utf-8" class=""><div dir="auto" class=""><div class=""></div><div class="">I still don't understand why we are not simply writing</div><div class=""><br class=""></div><div class="">let i = switch color {</div><div class="">&nbsp; &nbsp; &nbsp; &nbsp; case .Red: <span style="background-color: rgba(255, 255, 255, 0);" class="">0xFF0000</span></div><div class=""><span style="background-color: rgba(255, 255, 255, 0);" class="">&nbsp; &nbsp; &nbsp; &nbsp; case .Green:&nbsp;0x00FF00</span></div><div class=""><span style="background-color: rgba(255, 255, 255, 0);" class="">&nbsp; &nbsp; &nbsp; &nbsp; case .Blue:&nbsp;0x00000FF</span></div><div class=""><span style="background-color: rgba(255, 255, 255, 0);" class="">&nbsp; &nbsp; }</span></div><div class=""><br class=""></div><div class="">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 class=""><br class=""></div><div class="">-Thorsten&nbsp;</div><div class=""><br class=""></div><div class=""><br class="">Am 22.12.2015 um 15:31 schrieb Charles Constant via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt;:<br class=""><br class=""></div><blockquote type="cite" class=""><div class=""><div dir="ltr" class="">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 class=""><br class=""></div><div class=""><div class=""><div class=""><div class="">let i = which color {</div><div class=""><span class="" style="white-space:pre">        </span>? .Red: 0xFF0000,&nbsp;</div><div class=""><span class="" style="white-space:pre">        </span>? .Green: 0x00FF00,&nbsp;</div><div class=""><span class="" style="white-space:pre">        </span>? .Blue: 0x00000FF</div><div class="">}</div></div><div class=""><br class=""></div><div class=""><div class=""><div class="">let i = which boo {</div><div class=""><span class="" style="white-space:pre">        </span>? true: 1,&nbsp;</div><div class=""><span class="" style="white-space:pre">        </span>? false: 0,&nbsp;</div><div class=""><span class="" style="white-space:pre">        </span>? nil: -1</div><div class="">}</div></div><div class=""><br class=""></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;" class="">
</div></blockquote><blockquote type="cite" class=""><div class=""><span class="">_______________________________________________</span><br class=""><span class="">swift-evolution mailing list</span><br class=""><span class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a></span><br class=""><span class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a></span><br class=""></div></blockquote></div></div></blockquote></div><br class=""></div></body></html>