[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Boolean matters
- From: Coda Highland <chighland@...>
- Date: Sat, 1 Dec 2012 12:47:50 -0800
On Sat, Dec 1, 2012 at 11:50 AM, Dirk Laurie <dirk.laurie@gmail.com> wrote:
> 1. To convert a Lua value to boolean:
>
> bool = not not x
>
> 2. Exclusive or of Lua values x and y
>
> xor = not x == not y
>
> Anything better?
>
Convert to boolean as opposed to just use as boolean? I can't think of
anything better, no. That's the same idiom I use in C/C++.
/s/ Adam