[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Associativity
- From: Reuben Thomas <rrt@...>
- Date: Tue, 13 Aug 2002 18:13:16 +0100 (BST)
> > and don't mention optimisation of commutative operations in the
> > language definition, but only do it in cases where it makes no
> > difference.
>
> That means never :( Lua has dynamic typing, so the compiler cannot tell
> whether changing order will make any difference...
Ah, I see. You can tell that one operand is a constant, but you can't tell
what the other is, and a method might want to use a numeric operand on one
side, but not on the other...
In that case, I suppose you do need explicit rules.
--
http://www.mupsych.org/~rrt/ | art, n. romanticized mundanity