lua-users home
lua-l archive

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

> On Nov 19, 2013, at 7:27 PM, Tim Hill <> wrote:
> As has been noted, I don’t think “0 == false” should be true anyway .. in current Lua “nil == false” is also false. It’s important not to confuse “false-ness” with the value “false”.
> —Tim

Personally, I believe 0 should be equal to false and everything else should be equal to true. nil, being a special case, is false when compared to anything else other than nil.

In all my experience coding the values 0 and 1 have pretty much been the definitions of false and true. So having 0 == false, to me, just makes sense, and makes everything work as I would expect it to.

I appreciate your position, though I think I will be sticking with the patch as-is for LUNiA, I like my numeric zeros to be equivalent to boolean false in every way. :)