lua-users home
lua-l archive

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


> And this would be a perfect example of that:  adding "~= false" would
> serve no purpose, and would make code _harder_ to understand.  It's
> essentially obfuscating noise.

In a nil-less world, this would be a very uncommon operation anyway.
Nowadays the most shortcuts when to test non-boolean values is to test
if they are nil or something else, only having a to take care false
also might do false. In other areas Lua is avoiding this "I have to
shortcut everything" notion anyway. Note the missing += and ++
operators, or that e.g. if's always have blocks attached them
circumventing these C-ish pains of dangling elses or reappearing bugs
because people where to concise/lazy to do the {} blocks around one
argument, etc.