[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: false and nil
- From: Sam Putman <atmanistan@...>
- Date: Mon, 4 Jun 2018 13:34:03 -0700
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
So far so good!
> = nil and true
Excellent, Abelian, carry on
> = false and nil
.. Oh. That's not three-valued logic, then. Well at least
> = nil and false
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, and make the trio of values Abelian with respect to one another.