Given that the code currently emitted is incorrect, it's not like you have to worry about backward compatibility. Throwing an error would probably suffice.<br><br><div class="gmail_quote">On Thu, Aug 6, 2009 at 7:04 PM, Vladimir Sedach <span dir="ltr"><<a href="mailto:vsedach@gmail.com">vsedach@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I ran across this bug a long time ago. The equivalent of (> x y z) in<br>
JS would be (x > y) & (y > z). 'y' is evaluated multiple times, so<br>
you'd need to introduce a temporary variable for it. I wonder if there<br>
is any other approach (other than limiting the comparison operator to<br>
two arguments)?<br>
<br>
Vladimir<br>
<div><div></div><div class="h5"><br>
On Wed, Aug 5, 2009 at 1:45 PM, Daniel Gackle<<a href="mailto:danielgackle@gmail.com">danielgackle@gmail.com</a>> wrote:<br>
> PS generates code for expressions like (> x y z) as if the operators worked<br>
> the same way in JS and Lisp, but they don't. For example,<br>
><br>
> (ps (> 3 2 1))<br>
> => "3 > 2 > 1;"<br>
><br>
> ... is an expression that is true in Lisp but false in JS.<br>
><br>
> Daniel<br>
><br>
</div></div>> _______________________________________________<br>
> parenscript-devel mailing list<br>
> <a href="mailto:parenscript-devel@common-lisp.net">parenscript-devel@common-lisp.net</a><br>
> <a href="http://common-lisp.net/cgi-bin/mailman/listinfo/parenscript-devel" target="_blank">http://common-lisp.net/cgi-bin/mailman/listinfo/parenscript-devel</a><br>
><br>
><br>
<br>
_______________________________________________<br>
parenscript-devel mailing list<br>
<a href="mailto:parenscript-devel@common-lisp.net">parenscript-devel@common-lisp.net</a><br>
<a href="http://common-lisp.net/cgi-bin/mailman/listinfo/parenscript-devel" target="_blank">http://common-lisp.net/cgi-bin/mailman/listinfo/parenscript-devel</a><br>
</blockquote></div><br>