Hi,
I've been working a bit with SQL in Lua, which lead me to exercise a bit of curiousity at the REPL:
> = true and nil
nil
So far so good!
> = nil and true
nil
Excellent, Abelian, carry on
> = false and nil
false
.. Oh. That's not three-valued logic, then. Well at least
> = nil and false
nil
That's... not Abelian either.
I would like to propose that a future Lua have `false and nil` yield nil, and the same for `nil and false`. This would give an identical semantics to the three-valued SQL null[0], and make the trio of values Abelian with respect to one another.
Sincerely,
-Sam Putman.
--
Special Circumstances