lua-users home
lua-l archive

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

On 11/19/2013 08:43 PM, Paige DePol wrote:
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”.


Personally, I believe 0 should be equal to false and everything else should be equal to true.

Then, inevitably, you believe equality should be non-transitive or non-symmetric.

A:  2 == true
B:  3 == true
C:  true == 3   (symmetry, B)
D:  2 == 3      (transitivity, A, C)

You probably don't want "2 == 3" to be true.