[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Different shades of false
- From: Holger Stenger <stenger@...>
- Date: Thu, 2 Mar 2006 23:05:01 +0100
Ben Sunshine-Hill wrote:
> Worse yet, given Lua's willingness to go between numbers and their
> string representations, if 0==false, then it would be best to define
> that "0"==false. (And that "0e-3" be false, although "0f-3" would be
> true.) Yikes.
Automatic conversion of strings to numbers occurs only for arithmetic
operations. In other contexts 0 and "0" are different, like equality
tests or table indexing. If this were to change, it would be a real
nightmare (for me at least).