<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="">By the way my example should be read the question mark as, transform or map,&nbsp;<div class=""><br class=""></div><div class=""><b class="" style="color: rgb(96, 96, 96); font-family: Arial; font-size: 13px;"><span class="" style="white-space: pre-wrap;">        </span>let&nbsp;num =&nbsp;color ?&nbsp;</b><br class=""><b class="" style="color: rgb(96, 96, 96); font-family: Arial; font-size: 13px;"><span class="" style="white-space: pre-wrap;">        </span></b><b class="" style="color: rgb(96, 96, 96); font-family: Arial; font-size: 13px;"><span class="" style="white-space: pre-wrap;">        </span></b><b class="" style="font-family: Arial; font-size: 13px;"><font color="#4f7a28" class="">.Red&nbsp;</font></b><b class="" style="font-family: Arial; font-size: 13px;"><font color="#008cb4" class="">to</font></b><b class="" style="font-family: Arial; font-size: 13px; color: rgb(227, 36, 0);">&nbsp;</b><b class="" style="color: rgb(96, 96, 96); font-family: Arial; font-size: 13px;">100&nbsp;</b><b class="" style="color: rgb(96, 96, 96); font-family: Arial; font-size: 13px;">:&nbsp;</b><br class=""><b class="" style="color: rgb(96, 96, 96); font-family: Arial; font-size: 13px;"><span class="" style="white-space: pre-wrap;">        </span></b><b class="" style="font-family: Arial; font-size: 13px;"><span class="" style="white-space: pre-wrap;"><font color="#606060" class="">        </font><font color="#4f7a28" class="">.</font></span></b><b class="" style="font-family: Arial; font-size: 13px;"><font color="#4f7a28" class="">Green</font></b>&nbsp;&nbsp;<font color="#008cb4" class="">to</font>&nbsp;<b class="" style="color: rgb(96, 96, 96); font-family: Arial; font-size: 13px;">200</b><b class="" style="font-family: Arial; font-size: 13px; color: rgb(227, 36, 0);">&nbsp;</b><b class="" style="color: rgb(96, 96, 96); font-family: Arial; font-size: 13px;">:&nbsp;</b><br class=""><b class="" style="color: rgb(96, 96, 96); font-family: Arial; font-size: 13px;"><span class="" style="white-space: pre-wrap;">        </span></b><b class="" style="color: rgb(96, 96, 96); font-family: Arial; font-size: 13px;"><span class="" style="white-space: pre-wrap;">        </span></b><b class="" style="font-family: Arial; font-size: 13px;"><font color="#4f7a28" class="">.Blue</font></b><b class="" style="font-family: Arial; font-size: 13px; color: rgb(227, 36, 0);">&nbsp;</b><b class="" style="font-family: Arial; font-size: 13px;"><font color="#008cb4" class="">to</font></b><b class="" style="font-family: Arial; font-size: 13px; color: rgb(227, 36, 0);">&nbsp;</b><b class="" style="color: rgb(96, 96, 96); font-family: Arial; font-size: 13px;">300</b><b class="" style="font-family: Arial; font-size: 13px; color: rgb(227, 36, 0);">&nbsp;</b><b class="" style="color: rgb(96, 96, 96); font-family: Arial; font-size: 13px;">:&nbsp;</b><br class=""><div class=""><div class=""><div class=""><div dir="ltr" class=""><div class=""><div class=""><div class=""><span class="im"><div class="" style="font-size: 13px; margin: 0px; line-height: normal; font-family: Arial;"><b class="" style="color: rgb(96, 96, 96);"><span class="" style="white-space: pre-wrap;">        </span></b><b class="" style="color: rgb(96, 96, 96);"><span class="" style="white-space: pre-wrap;">        </span></b><b class=""><font color="#4f7a28" class="">default</font></b><b class="" style="color: rgb(227, 36, 0);">&nbsp;&nbsp;</b><b class=""><font color="#008cb4" class="">to</font></b><b class="" style="color: rgb(227, 36, 0);">&nbsp;</b><b class="" style="color: rgb(96, 96, 96);">-1</b><b class="" style="color: rgb(227, 36, 0);">&nbsp;</b></div></span></div></div></div></div></div></div></div><div class=""><div class=""><div class=""><div class=""><div dir="ltr" class=""><div class=""><div class=""><div class=""><span class="im"><div class="" style="font-size: 13px; margin: 0px; line-height: normal; font-family: Arial;"><b class="" style="color: rgb(227, 36, 0);"><br class=""></b></div></span></div></div></div></div></div></div></div></div><div class=""><div class=""><b class="" style="color: rgb(96, 96, 96); font-family: Arial; font-size: 13px;"><span class="" style="white-space: pre-wrap;">        </span>let&nbsp;num =&nbsp;color </b><b class="" style="font-family: Arial; font-size: 13px;"><font color="#008cb4" class="">map</font></b><br class=""><b class="" style="color: rgb(96, 96, 96); font-family: Arial; font-size: 13px;"><span class="" style="white-space: pre-wrap;">        </span></b><b class="" style="color: rgb(96, 96, 96); font-family: Arial; font-size: 13px;"><span class="" style="white-space: pre-wrap;">        </span></b><b class="" style="font-family: Arial; font-size: 13px;"><font color="#4f7a28" class="">.Red&nbsp;</font></b><b class="" style="font-family: Arial; font-size: 13px;"><font color="#008cb4" class="">to</font></b><b class="" style="font-family: Arial; font-size: 13px; color: rgb(227, 36, 0);">&nbsp;</b><b class="" style="color: rgb(96, 96, 96); font-family: Arial; font-size: 13px;">100&nbsp;</b><b class="" style="color: rgb(96, 96, 96); font-family: Arial; font-size: 13px;">:&nbsp;</b><br class=""><b class="" style="color: rgb(96, 96, 96); font-family: Arial; font-size: 13px;"><span class="" style="white-space: pre-wrap;">        </span></b><b class="" style="font-family: Arial; font-size: 13px;"><span class="" style="white-space: pre-wrap;"><font color="#606060" class="">        </font><font color="#4f7a28" class="">.</font></span></b><b class="" style="font-family: Arial; font-size: 13px;"><font color="#4f7a28" class="">Green</font></b>&nbsp;&nbsp;<font color="#008cb4" class="">to</font>&nbsp;<b class="" style="color: rgb(96, 96, 96); font-family: Arial; font-size: 13px;">200</b><b class="" style="font-family: Arial; font-size: 13px; color: rgb(227, 36, 0);">&nbsp;</b><b class="" style="color: rgb(96, 96, 96); font-family: Arial; font-size: 13px;">:&nbsp;</b><br class=""><b class="" style="color: rgb(96, 96, 96); font-family: Arial; font-size: 13px;"><span class="" style="white-space: pre-wrap;">        </span></b><b class="" style="color: rgb(96, 96, 96); font-family: Arial; font-size: 13px;"><span class="" style="white-space: pre-wrap;">        </span></b><b class="" style="font-family: Arial; font-size: 13px;"><font color="#4f7a28" class="">.Blue</font></b><b class="" style="font-family: Arial; font-size: 13px; color: rgb(227, 36, 0);">&nbsp;</b><b class="" style="font-family: Arial; font-size: 13px;"><font color="#008cb4" class="">to</font></b><b class="" style="font-family: Arial; font-size: 13px; color: rgb(227, 36, 0);">&nbsp;</b><b class="" style="color: rgb(96, 96, 96); font-family: Arial; font-size: 13px;">300</b><b class="" style="font-family: Arial; font-size: 13px; color: rgb(227, 36, 0);">&nbsp;</b><b class="" style="color: rgb(96, 96, 96); font-family: Arial; font-size: 13px;">:&nbsp;</b><br class=""><div class=""><div class=""><div class=""><div dir="ltr" class=""><div class=""><div class=""><div class=""><span class="im"><div class="" style="font-size: 13px; margin: 0px; line-height: normal; font-family: Arial;"><b class="" style="color: rgb(96, 96, 96);"><span class="" style="white-space: pre-wrap;">        </span></b><b class="" style="color: rgb(96, 96, 96);"><span class="" style="white-space: pre-wrap;">        </span></b><b class=""><font color="#4f7a28" class="">default</font></b><b class="" style="color: rgb(227, 36, 0);">&nbsp;&nbsp;</b><b class=""><font color="#008cb4" class="">to</font></b><b class="" style="color: rgb(227, 36, 0);">&nbsp;</b><b class="" style="color: rgb(96, 96, 96);">-1</b><b class="" style="color: rgb(227, 36, 0);">&nbsp;</b></div></span></div></div></div></div></div></div></div></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 9, 2016, at 5:16 PM, Paul Ossenbruggen &lt;<a href="mailto:possen@gmail.com" class="">possen@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div class=""><div class=""><div class=""><span class="im"><div class="" style="font-size: 13px; margin: 0px; line-height: normal; font-family: Arial; color: rgb(96, 96, 96);"><b class="" style="color: rgb(227, 36, 0);"><br class="Apple-interchange-newline"><br class=""></b></div><div class="" style="font-size: 13px; margin: 0px; line-height: normal; font-family: Arial; color: rgb(96, 96, 96);"><b class="" style="color: rgb(227, 36, 0);"><br class=""></b></div></span></div></div></div></div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" class=""><div class="">On Jan 9, 2016, at 4:09 PM, Charles Constant &lt;<a href="mailto:charles@charlesism.com" class="">charles@charlesism.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">More fiddling... any takers for "on"?&nbsp;<div class=""><br class=""></div><div class="">Yes, this is partly a last ditch attempt trying to revive my earlier proposal :) It still irks me that we'd have a switch using the colon two different ways. Also my last suggestion had the order reversed ( i.e.: "val =test" but then "==test val" in the cases ) which is irritating.<div class=""><div class=""><br class=""></div><div class=""><span class="im"><div class="" style="font-size: 13px; margin: 0px; line-height: normal; font-family: Arial; color: rgb(96, 96, 96);"><b class=""><span class="" style="white-space: pre-wrap;">        </span>let&nbsp;str =&nbsp;boo ?&nbsp;</b></div><div class="" style="font-size: 13px; margin: 0px; line-height: normal; font-family: Arial; color: rgb(96, 96, 96);"><b class=""><span class="" style="white-space: pre-wrap;">        </span></b><b class=""><span class="" style="white-space: pre-wrap;">        </span></b><b class="">"yes"<span class="Apple-converted-space">&nbsp;</span></b><b class="" style="color: rgb(227, 36, 0);">on true&nbsp;</b><b class="">:&nbsp;</b></div><div class="" style="font-size: 13px; margin: 0px; line-height: normal; font-family: Arial; color: rgb(96, 96, 96);"><b class=""><span class="" style="white-space: pre-wrap;">        </span></b><b class=""><span class="" style="white-space: pre-wrap;">        </span></b><b class="">"no"&nbsp;</b><b class="" style="color: rgb(227, 36, 0);">on&nbsp;</b><b class="" style="color: rgb(227, 36, 0);">false</b></div><div class="" style="font-size: 13px; margin: 0px; line-height: normal; font-family: Arial; color: rgb(96, 96, 96);"><b class=""><br class=""></b></div><div class="" style="font-size: 13px; margin: 0px; line-height: normal; font-family: Arial; color: rgb(96, 96, 96);"><b class=""><span class="" style="white-space: pre-wrap;">        </span>let&nbsp;num =&nbsp;color ?&nbsp;</b></div><div class="" style="font-size: 13px; margin: 0px; line-height: normal; font-family: Arial; color: rgb(96, 96, 96);"><b class=""><span class="" style="white-space: pre-wrap;">        </span></b><b class=""><span class="" style="white-space: pre-wrap;">        </span></b><b class="">100&nbsp;</b><b class="" style="color: rgb(227, 36, 0);">on .Red&nbsp;</b><b class="">:&nbsp;</b></div><div class="" style="font-size: 13px; margin: 0px; line-height: normal; font-family: Arial; color: rgb(96, 96, 96);"><b class=""><span class="" style="white-space: pre-wrap;">        </span></b><b class=""><span class="" style="white-space: pre-wrap;">        </span></b><b class="">200&nbsp;</b><b class="" style="color: rgb(227, 36, 0);">on .Green</b><b class="" style="color: rgb(227, 36, 0);">&nbsp;</b><b class="">:&nbsp;</b></div><div class="" style="font-size: 13px; margin: 0px; line-height: normal; font-family: Arial; color: rgb(96, 96, 96);"><b class=""><span class="" style="white-space: pre-wrap;">        </span></b><b class=""><span class="" style="white-space: pre-wrap;">        </span></b><b class="">300&nbsp;</b><b class="" style="color: rgb(227, 36, 0);">on .Blue&nbsp;</b><b class="" style="color: rgb(227, 36, 0);">&nbsp;</b><b class="">:&nbsp;</b></div><div class="" style="font-size: 13px; margin: 0px; line-height: normal; font-family: Arial; color: rgb(96, 96, 96);"><b class=""><span class="" style="white-space: pre-wrap;">        </span></b><b class=""><span class="" style="white-space: pre-wrap;">        </span></b><b class="">-1&nbsp;</b><b class="" style="color: rgb(227, 36, 0);">on default&nbsp;</b></div><div class="" style="font-size: 13px; margin: 0px; line-height: normal; font-family: Arial; color: rgb(96, 96, 96);"><br class=""></div></span></div></div></div></div></div></blockquote><div class=""><br class=""></div><div class=""><span class=""><span class=""><font class=""><font face="Arial" class="">This does have some nice properties, like more compact than&nbsp;“case", don’t need the word&nbsp;“case" out front and a separator. Having the order the other way though I think&nbsp;would not work. You would need t support long expressions etc, so I&nbsp;don’t think having it reversed would be popular. Perhaps something like this</font></font><br class="" style="font-family: Helvetica; font-size: 12px; font-weight: normal; white-space: normal;"><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-weight: normal; white-space: normal;"></blockquote><br class=""></span></span><div class=""><b class="" style="color: rgb(96, 96, 96); font-family: Arial; font-size: 13px;"><span class="" style="white-space: pre-wrap;">        </span>let&nbsp;num =&nbsp;color ?&nbsp;</b><br class=""><b class="" style="color: rgb(96, 96, 96); font-family: Arial; font-size: 13px;"><span class="" style="white-space: pre-wrap;">        </span></b><b class="" style="color: rgb(96, 96, 96); font-family: Arial; font-size: 13px;"><span class="" style="white-space: pre-wrap;">        </span></b><b class="" style="font-family: Arial; font-size: 13px;"><font color="#4f7a28" class="">.Red<span class="Apple-converted-space">&nbsp;</span></font></b><b class="" style="font-family: Arial; font-size: 13px;"><font color="#008cb4" class="">to</font></b><b class="" style="font-family: Arial; font-size: 13px; color: rgb(227, 36, 0);">&nbsp;</b><b class="" style="color: rgb(96, 96, 96); font-family: Arial; font-size: 13px;">100&nbsp;</b><b class="" style="color: rgb(96, 96, 96); font-family: Arial; font-size: 13px;">:&nbsp;</b><br class=""><b class="" style="color: rgb(96, 96, 96); font-family: Arial; font-size: 13px;"><span class="" style="white-space: pre-wrap;">        </span></b><b class="" style="font-family: Arial; font-size: 13px;"><span class="" style="white-space: pre-wrap;"><font color="#606060" class="">        </font><font color="#4f7a28" class="">.</font></span></b><b class="" style="font-family: Arial; font-size: 13px;"><font color="#4f7a28" class="">Green</font></b>&nbsp;<span class="Apple-converted-space">&nbsp;</span><font color="#008cb4" class="">to</font>&nbsp;<b class="" style="color: rgb(96, 96, 96); font-family: Arial; font-size: 13px;">200</b><b class="" style="font-family: Arial; font-size: 13px; color: rgb(227, 36, 0);">&nbsp;</b><b class="" style="color: rgb(96, 96, 96); font-family: Arial; font-size: 13px;">:&nbsp;</b><br class=""><b class="" style="color: rgb(96, 96, 96); font-family: Arial; font-size: 13px;"><span class="" style="white-space: pre-wrap;">        </span></b><b class="" style="color: rgb(96, 96, 96); font-family: Arial; font-size: 13px;"><span class="" style="white-space: pre-wrap;">        </span></b><b class="" style="font-family: Arial; font-size: 13px;"><font color="#4f7a28" class="">.Blue</font></b><b class="" style="font-family: Arial; font-size: 13px; color: rgb(227, 36, 0);"><span class="Apple-converted-space">&nbsp;</span></b><b class="" style="font-family: Arial; font-size: 13px;"><font color="#008cb4" class="">to</font></b><b class="" style="font-family: Arial; font-size: 13px; color: rgb(227, 36, 0);">&nbsp;</b><b class="" style="color: rgb(96, 96, 96); font-family: Arial; font-size: 13px;">300</b><b class="" style="font-family: Arial; font-size: 13px; color: rgb(227, 36, 0);">&nbsp;</b><b class="" style="color: rgb(96, 96, 96); font-family: Arial; font-size: 13px;">:&nbsp;</b><br class=""><div dir="ltr" class=""><div class=""><div class=""><div class=""><span class="im"><div class="" style="font-size: 13px; margin: 0px; line-height: normal; font-family: Arial;"><b class="" style="color: rgb(96, 96, 96);"><span class="" style="white-space: pre-wrap;">        </span></b><b class="" style="color: rgb(96, 96, 96);"><span class="" style="white-space: pre-wrap;">        </span></b><b class=""><font color="#4f7a28" class="">default</font></b><b class="" style="color: rgb(227, 36, 0);"><span class="Apple-converted-space">&nbsp;</span>&nbsp;</b><b class=""><font color="#008cb4" class="">to</font></b><b class="" style="color: rgb(227, 36, 0);">&nbsp;</b><b class="" style="color: rgb(96, 96, 96);">-1</b><b class="" style="color: rgb(227, 36, 0);">&nbsp;</b></div></span></div></div></div></div></div></div><div class=""><br class=""></div><div class="">I like some of it but, I still want to put the colons in-between the case labels. This syntax would be seen as too different from something we already have with the “case label: expression” syntax. Maybe seen as “different but not better"</div><div class=""><br class=""></div><div class="">Meanwhile I have been learning Scala. The unary function, partial functions, and pattern matching stuff looks cool.</div><div class=""><br class=""></div><div class="">- Paul&nbsp;</div><div class=""><br class=""></div><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><div class=""><div class=""><span class="im"><div class="" style="margin: 0px; line-height: normal;"><font color="#222222" class=""><br class=""></font></div><div class="" style="margin: 0px; line-height: normal;"><font color="#222222" class="">The more verbose forms will be easier to learn, I suppose, but it's also nice, when you have a long list of things like this, to keep things as json-y as possible. Granted if we use the short version, there's developers who&nbsp;will flame anyone listening for&nbsp;</font><span class="" style="color: rgb(34, 34, 34);">doubling down on</span><font color="#222222" class="">&nbsp;the evil ternary.</font><br class=""></div><div class="" style="font-size: 13px;"><span class="" style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: small;"><br class=""></span></div></span></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div></div></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Fri, Jan 8, 2016 at 11:18 AM, Chris Lattner<span class="Apple-converted-space">&nbsp;</span><span dir="ltr" class="">&lt;<a href="mailto:clattner@apple.com" target="_blank" class="">clattner@apple.com</a>&gt;</span><span class="Apple-converted-space">&nbsp;</span>wrote:<br class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;">On Jan 7, 2016, at 12:10 AM, Paul Ossenbruggen &lt;<a href="mailto:possen@gmail.com" class="">possen@gmail.com</a>&gt; wrote:<br class="">&gt; Just a few hopefully quick questions:<br class="">&gt;<br class="">&gt; Do you have any thoughts on supporting two forms? Like the compact form where case and default are not present, and the more formal switch like form?<br class=""><br class="">Adding two forms seems very unlikely to be accepted - even adding one form is unclear :-)<br class=""><br class="">&gt; Do you have any specific reasons to not support “where”? Is it just to keep it simple and when we need more complexity use the statement form?<br class=""><br class="">I don’t have a strong objection to where, other than trying to keep things simple.&nbsp; It is reasonable to argue that removing “where” makes things more complex by making the expression *different* from the statement though.<br class=""><span class="HOEnZb"><font color="#888888" class=""><br class="">-Chris</font></span></blockquote></div></div></div></blockquote></div></div></blockquote></div><br class=""></div></div></div></body></html>