lua-users home
lua-l archive

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


Hi

I am carrying this in my mind for some time now and I guess, I am not alone:

What about a few new operators?
I think most people with a C/C++ background are missing the += *= etc operators
- and in my opinion these are really useful. 

I have quite alot of vectoroperations in my luacode and it would be really great
if I could write

x,y,z += vx,vy,vz
or
x,y,z /= len,len,len

instead of

x,y,z = x + vx, y + vy, z + vz
or
x,y,z = x / len, y / len, z / len

It can be easier read and understood and is less to write. 

Are there any reasons that speak against such operators (btw., the # operator is
was a great addition to 5.1)?

greetings
Eike Decker