lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


lhf wrote:
> In general, code in Lua is generated from left to right, as it is read
from
> the source. But you're right the manual does not say anything about order
> of evaluation. In any case, you should not write code that depends on
this,
> although I agree that Lua's semantics may make it hard to do this, if
you're
> writing complicated code with lots of tag mathods.

Are you saying we shouldn't program with side effects?  That is ironic for a
language where variables default to the global scope.

I think any language that allows side effects should be very clear about
evaluation order.

-John