At 8:53 PM -0700 7/29/02, Sean O'Rourke wrote:
>On Mon, 29 Jul 2002, Dan Sugalski wrote:
>>  If I thought anyone'd do control flow with it, I'd have a version of
>>  the op for that, but I don't think we're going to see that, and perl
>>  doesn't do it, so...
>
>Okay, writing this email has convinced me that maybe we don't need these
>ops.  If Perl's going to do things like this:
>
>     $x = 1; $y = 2; $z = "grape";
>     if $z < $x < $y lt $z { print "strange, but true" }
>
>then it seems like they'll be used for control flow just like anything
>else.  The alternative would be to do this with the Ix versions like so:
>
>     cmpn I0, Px, Py
>     unless I0, -1, l_false
>
>Or with the current set of ops, through temps like so:
>
>     set N0, Px
>     set N1, Py
>     ge N0, N1, l_false

I need to get Larry to nail some things down. On the one hand, he's 
said that chained comparisons evaluate their parameters just once. 
That argues for moving the values to N or S registers. On the other, 
comparisons are overloadable, which means we need to call the PMC's 
vtable entries. But chained comparisons will result in us calling 
those entries multiple times, when we've been declared to call them 
only once.

Hrmf. Time to nudge. Oh. Larry.... :)
-- 
                                         Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                       teddy bears get drunk

Reply via email to