[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: "+="
- From: Gavin Wraith <gavin@...>
- Date: Tue, 11 Apr 2000 12:37:07 +0100 (BST)
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
"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 (email@example.com) or (firstname.lastname@example.org)
Home page: http://www.wraith.u-net.com/