lua-users home
lua-l archive

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


On Thursday 13 November 2008, V S P wrote:
> if( js_iop_or( js_iop_lt( arr1['field1'], arr2['field1'])
> , js_iop_lt( arr2[33][15], arr1['field2'])


i see you're using functions for operators.  does that meas that operands are 
evaluated?

for example, i usually do:

   if a and a.b then.....

to avoid evaluating 'a.b' until i know that 'a' is not null.  in your 
translation, both terms would be evaluated before evaluating the 'and' 
itself.

another shortcoming i don't see addressed is JavaScript limitation on table 
keys.  in JS keys are only strings, while in Lua they can be any object 
(except null).

do you plan to do something about these?

-- 
Javier

Attachment: signature.asc
Description: This is a digitally signed message part.