[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Zero as False
- From: Tim Hill <drtimhill@...>
- Date: Tue, 19 Nov 2013 17:47:56 -0800
On Nov 19, 2013, at 5:43 PM, Paige DePol <lual@serfnet.org> wrote:
>> On Nov 19, 2013, at 7:27 PM, Tim Hill <drtimhill@gmail.com> wrote:
>>
>> As has been noted, I don’t think “0 == false” should be true anyway .. in current Lua “nil == false” is also false. It’s important not to confuse “false-ness” with the value “false”.
>>
>> —Tim
>
> Personally, I believe 0 should be equal to false and everything else should be equal to true. nil, being a special case, is false when compared to anything else other than nil.
>
> In all my experience coding the values 0 and 1 have pretty much been the definitions of false and true. So having 0 == false, to me, just makes sense, and makes everything work as I would expect it to.
>
> I appreciate your position, though I think I will be sticking with the patch as-is for LUNiA, I like my numeric zeros to be equivalent to boolean false in every way. :)
>
> ~pmd~
>
>
So, playing devil’s advocate a bit then .. what reason is there to even keep a boolean type in your Lua derivation? Aren’t you moving bit-by-bit to the C definition of true/false?
—Tim
- References:
- Zero as False, Paige DePol
- Re: Zero as False, Paige DePol
- Re: Zero as False, Paige DePol
- Re: Zero as False, Daurnimator
- Re: Zero as False, Rena
- Re: Zero as False, Paige DePol
- Re: Zero as False, Coda Highland
- Re: Zero as False, Paige DePol
- Re: Zero as False, Coda Highland
- Re: Zero as False, Paige DePol
- Re: Zero as False, Tim Hill
- Re: Zero as False, Paige DePol