<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<div>If the goal is to provide a fall-through behavior that's also easy to read, then it would make sense to look at some of the other languages besides Algol 86: C, C++, Java, PHP, ... (default), Ruby (else). I like the idea of a different reserved word (not 'or') being used to signify another branching path. </div><div><br></div><div>consider:</div><div><br></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Courier" size="4" style="font: 13.0px Courier">'case' Expression 'of'</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Courier" size="4" style="font: 13.0px Courier"><span class="Apple-tab-span" style="white-space:pre"> </span>Pattern ['when' Guard] '->' Expression</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Courier" size="4" style="font: 13.0px Courier"> {';' Pattern ['when' Guard] '->' Expression}...</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Courier" size="4" style="font: 13.0px Courier"> {';' 'else' 'case' Expression 'of'</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Courier" size="4" style="font: 13.0px Courier"><span class="Apple-tab-span" style="white-space:pre"> </span>Pattern ['when' Guard] '->' Expression</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Courier" size="4" style="font: 13.0px Courier"><span class="Apple-tab-span" style="white-space:pre"> </span> {';' Pattern ['when' Guard] '->' Expression}...}...</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Courier" size="4" style="font: 13.0px Courier">'end'</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 13px;"><br></span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 13px;"><br></span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 13px;">or:</span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 13px;"><br></span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 13px;"><br></span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 13px;"><span class="Apple-style-span" style="font-family: Helvetica; font-size: 12px; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Courier" size="4" style="font: normal normal normal 13px/normal Courier; ">'case' Expression 'of'</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Courier" size="4" style="font: normal normal normal 13px/normal Courier; "><span class="Apple-tab-span" style="white-space: pre; "> </span>Pattern ['when' Guard] '->' Expression</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Courier" size="4" style="font: normal normal normal 13px/normal Courier; "> {';' Pattern ['when' Guard] '->' Expression}...</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Courier" size="4" style="font: normal normal normal 13px/normal Courier; "> {';' 'default' 'case' Expression 'of'</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Courier" size="4" style="font: normal normal normal 13px/normal Courier; "><span class="Apple-tab-span" style="white-space: pre; "> </span>Pattern ['when' Guard] '->' Expression</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Courier" size="4" style="font: normal normal normal 13px/normal Courier; "><span class="Apple-tab-span" style="white-space: pre; "> </span> {';' Pattern ['when' Guard] '->' Expression}...}...</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Courier" size="4" style="font: normal normal normal 13px/normal Courier; ">'end'</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 13px;"><br></span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">I personally like 'else' but that might be my Ruby bias. 'default' never makes semantic sense to me when using C based languages but I just accepted it as it was. The best word is really 'otherwise' but that's too long. 'els' is nice for spacing concerns. </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">I wonder if the parser should support two 'end' statements as i expect that it will be one of the most common mistakes that someone will make. Also, will the 'or' 'else' also support a fall-through return for the block? </div></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Cheers,</div></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Abhay</div></span></span></font></div></div><br><div><div>On Dec 19, 2008, at 6:37 AM, Camille Troillard wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hey everyone,<br><br><div class="gmail_quote">On Fri, Dec 19, 2008 at 3:28 PM, Vlad Dumitrescu <span dir="ltr"><<a href="mailto:vladdu55@gmail.com">vladdu55@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"> <div class="Ih2E3d">> I for one find it acceptable. The "; or case" construct is ok -<br> > perhaps not extremely elegant, but conveys the meaning<br> > very well.<br> <br> </div>This was the only aspect I was about to comment on too. Maybe "; else<br> case" sounds better?</blockquote><div><br></div><div>I find this new construct very useful and helps keeping things neat instead of deeply nested.</div><div>However I am also concerned by the "or" keyword.</div> <div>This may sound stupid but, on many keyboard the 'R' and the 'F' are very close, making OR and OF even more similar.</div><div><br></div><div>I like "; else case", but before reading Vlad's post, I was about to suggest "; other case".</div> <div><br></div><div><br></div><div>Best,</div><div>Cam</div></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_______________________________________________</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">eeps mailing list</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><a href="mailto:eeps@erlang.org">eeps@erlang.org</a></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><a href="http://www.erlang.org/mailman/listinfo/eeps">http://www.erlang.org/mailman/listinfo/eeps</a></div> </blockquote></div><br></body></html>