lua-users home
lua-l archive

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


On Wed, 2007-04-11 at 20:34 +0100, Andy Stark wrote:
> An alternative to assignment operators (+=, etc) might be to have a
> shorthand for referring to the variables on the left hand side of the
> assignment. Perhaps one of the unused characters (question mark, say)
> could be used for this. So if we started with:-
> 
>    longVarName = longVarName + 1
> 
> ...we could change it to:-
> 
>    longVarName = ? + 1
> 
> ...and then perhaps ?1, ?2, etc for multiple assignments.

At least two people have suggested this (or something similar) before,
and I've always felt that it looks and feels a little bit to "magical"
in the Perl sense - certainly the use of a special character.

B.