lua-users home
lua-l archive

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

Walter Cruz wrote:
> Hi. A little question:
> Why lua doesn't have the ++ operator ?!
> []'s
> - Walter
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
Thomas Harning Jr.

Attachment: signature.asc
Description: OpenPGP digital signature