[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: why not ++ in lua?
- From: Lisa Parratt <lisa@...>
- Date: Tue, 29 Nov 2005 16:34:36 +0000
Thomas Harning Jr. wrote:
I'd love this operator as well, though I can see where it might get
shot down (the side-effects issue).
It'd be great for shortening code. (same with --).
Besides the shortening, it becomes more concise in that you know its
being incremented, rather than being assigned to some operation
(though it is trivial mind-work).
Other operators that would be nice is -= and +=.
No new opcodes would be necessary to implement either of these
(though perhaps there's optimizations to be made if there were
Surely this makes the handling of + and - metamethods an absolute nightmare?
Other than that, it'd be really nice ;)