<div class="gmail_quote">"Assignment attempt operator", eh? I think I can work with that. :-)<br>We might then be back to having to nudge Core Erlang, or find ways to express the bindings neatly in that representation, but that's not necessarily bad.<br>
<br>(I was somewhat disappointed to find that at present, guards aren't included in the decision tree calculation; i had hoped that the pattern/guard separation wasn't so wide in that part of the compiler.)<br><br>
Den 16. apr. 2012 02.53 skrev Richard O'Keefe <span dir="ltr"><<a href="mailto:ok@cs.otago.ac.nz">ok@cs.otago.ac.nz</a>></span>:<br><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Let's see where we can get if we<br>
(1) Fix the operand order to be compatible with =<br>
(2) Fix the spelling of the operator to be something<br>
that suggests matching and suggests testing (for<br>
me, with the languages I am familiar with, ~<br>
really doesn't do either)<br>
(3) Spell out the semantics, specifically the escape/<br>
propagation of bindings, clearly and explicitly.<br>
<br>
Pattern ?= Expression<br>
<br>
is a familiar operator (well, it is if you know Eiffel,<br>
where it's called "assignment attempt") which addresses<br>
(1) and (2). I've spent some time on (3), thought I was<br>
getting close, and realised I'd failed. In<br>
<br>
p(X) when Y ?= 10 div X orelse Y ?= oops -><br>
q(Y).<br>
<br>
I definitely want Y to be visible in the body. With<br>
<br>
p(X) when Y = 10 div X ; Y = oops -> q(Y).<br>
<br>
the scope rules would have been very nearly automatic.<br>
<br>
</blockquote></div><br>