[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: nil isn't as unique in Lua 4.1
- From: Roberto Ierusalimschy <rieru@...>
- Date: Fri, 11 Jan 2002 10:12:57 -0600 (CST)
On Thu, 10 Jan 2002, Peter Shook wrote:
> I'd agree that most of the time it isn't a big deal. I'm just a little
> saddened that the once beautifully simple 'or' operator is now somewhat
> tarnished, and there isn't really a compelling reason or need for a
> boolean type.
The 'or' operator never worked for boolean values. If nil (the false value
in 4.0) were among the valid values of "a", the expression "a or b" would
not give you the first "valid" (or defined) result.
The boolean type did not change that. (At least now we can speculate about
a "ond" operator ;-)