lua-users home
lua-l archive

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


I also give my vote for this feature.  Both the shorter syntax and the
possible optimizations (which worked great in Scriptix) are Good
Things(tm).

On Wed, 2002-06-05 at 14:46, Josh Jensen wrote:
> > 2) += and -= operators
> >Vote: NO
> 
> I vote yes.  This is actually a huge thorn, IMO, and makes scripts much
> more verbose than they need to be:
> 
> Table1.table2.table3.table4.value += 1
> 
> OR:
> 
> Table1.table2.table3.table4.value = Table1.table2.table3.table4.value +
> 1
> 
> OR:
> 
> local tempTable = Table1.table2.table3.table4
> tempTable.value = tempTable.value + 1
> 
> I choose the first one.  Additionally, the first one allows the Lua VM
> to make certain optimizations that make it WAY faster than #2 and even
> faster than #3.
> 
> -Josh