[chuck-users] time and truth (bug?)
Stephen Sinclair
radarsat1 at gmail.com
Thu Jul 24 10:21:50 EDT 2008
On Thu, Jul 24, 2008 at 2:35 AM, Kassen <signal.automatique at gmail.com> wrote:
> Dear list,
>
> Considering that this is valid;
>
> if (now) <<<"yay">>>;
> if (second) <<<"hurray">>>;
>
> I feel that this should be valid as well;
>
> if (now && true) <<<"this won't parse">>>;
Agreed. The && operator does an implicit cast to boolean values, so
it should work, since it shouldn't actually be comparing int and time,
but comparing two booleans which have been derived from int and time.
I'd say its a bug.
Steve
More information about the chuck-users
mailing list