lua-users home
lua-l archive

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


> On Nov 19, 2013, at 5:32 PM, Coda Highland <chighland@gmail.com> wrote:
> 
> It may not actually be an issue. The change you've been describing has
> MOSTLY been "zero is falsy" rather than "zero is identical to false".
> If that's the case, I personally wouldn't have a problem with saying
> that (0 == false) is false even if 0 evaluates falsy in a boolean
> context.
> 
> Really, it's the "and" and "or" operators that are the real concern,
> moreso than equality comparisons.
> 
> /s/ Adam

Well right now 0 is "mostly false" as Douglas Adams may say... lol! Boolean operations using 0 do treat it as false, including and/or, just those equality operators that are being tricksy when using the boolean true/false keywords! ;(

I am interested in tracking down why the equality operators do not treat 0 as false though, mostly for my own understanding, but also so I can have a true "0 is always false" patch with no half-measures! ;)

~pmd~