lua-users home
lua-l archive

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


Why is the ~= operator the != operator in Lua in the first place? Perhaps 
someone could share this bit of information?

I understand that the ~ is akin to the mathematical 'not' operator, but Lua's 
authors were certainly aware how prevelant the use of != is.

Things should differ from the norm to be better (like Lua's treatment of 
boolean tests), not for the sake of being different.

If the reason that ~= was selected was to differentiate Lua from C, then I'd 
have to agree that it should be changed. Making a decision on those grounds 
alone throws a stumbling block in the way of people that use C-derived 
language - one that I trip over when I (infrequently) use Lua.

-- David Cuny