lua-users home
lua-l archive

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


2009/11/5 Fabien <fleutot+lua@gmail.com>:
>> I'm planning to translate the code like that:
>>
>> m[i, j]         => __index(m, i, j)
>> m[i, j] = v    => __newindex(m, i, j, v)
>
> Beware that translating multiple assignments might be trickier than it
> seems, if right-hand-side terms and/or __newindex methods have side effects:
> foo, bar[i,j], bar[k,l] = f1(), f2()

I'm sorry but I don't understand. Could you explain better your point ?

Francesco