<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 2019-04-19 3:43 p.m., Jerzy
Karczmarczuk wrote:<br>
</div>
<blockquote type="cite"
cite="mid:50333d55-322a-c1b2-63a7-65c8ab9e261f@unicaen.fr">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<p>Le 19/04/2019 à 19:31, Albert Y. C. Lai a écrit :<br>
</p>
<blockquote type="cite"
cite="mid:b265a68b-915b-b2a4-ec75-b6dfbc7ab0bd@vex.net">I am
late to this discussion but here is my solution. <br>
<br>
This is really just story-telling to end-users. <br>
<br>
The real story you want to tell everyone is this: "x &&
y && z && t" means Scheme's "(and x y z t)", and
it means you try the sequence from left to right, stopping at
the first incident of "false". <br>
/.../<br>
As many of you have observed, it doesn't matter, a compiler
writer already knows it's "(and x y z t)" and generates the
correct code and not bother to split hair. <br>
</blockquote>
<p>Very, ehm, interesting methodology...<br>
</p>
<p>I suspect that you missed that part of the discussion where
people discussed parsing. I don't know if you ever taught
compilation, but imagine that your students ask you: <br>
</p>
<p><b><i><font color="#3333ff">HOW</font> </i></b><b><i>"x
&& y && z && t" is transformed into
</i></b><b><i>"(and x y z t)" ?</i></b></p>
<p>Will your answer be:</p>
<p> <font color="#660000"><b><i>it doesn't matter, a compiler
writer already knows it's "(and x y z t)" and generates
the correct code and not bother to split hair</i></b></font></p>
</blockquote>
<p><br>
</p>
<p>What would you tell students about commas and semicolons in the
following? Are these commas and semicolons left associating?
Right associating? Both? Neither? Has anyone even asked? How
to parse them? I would tell the same.</p>
<p>Pascal's "begin foo() ; tora() ; tigger() end"</p>
<p>C's "x = (y=10 , y=f(y) , y=g(y) , y);"</p>
<p>Haskell's "f x | g x > 0 , h x < 0 , sin x > 0 = ()"</p>
<p>Prolog's "g(X,Y) :- parent(X,C1) , parent(C1,C2) , parent(C2,Y)."</p>
<p>Matlab's "[3+4i , 3 , 5-i ; 1-i , 1+i , 1 ; 7+8i , 4-3i , -i]"<br>
</p>
</body>
</html>