lua-users home
lua-l archive

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

If this topic has been aired previously on the Lua
list, my apologies. 
Am I right in thinking that the Lua VM does two
lookups in executing something like
"a.b.c.d.e.f = a.b.c.d.e.f + 57" ?
If so, is there not a case for borrowing from C
its updating assignment operations, so that we
could write
"a.b.c.d.e.f += 57" , or if you prefer
"increase a.b.c.d.e.f by 57" ?
OK, one can always improve it by using a local
"local x = a.b.c.d.e; x.f = x.f + 57"
but that is still not optimal.
This is presumably something which any language
must address which allows complex L-value
expressions. Any plans for this in a future
Gavin Wraith ( or (
Home page: