1 matches bool, 2 matches long

Rob T alanb at ucora.com
Sat Apr 27 15:21:34 PDT 2013


On Saturday, 27 April 2013 at 21:52:30 UTC, Walter Bright wrote:
> On 4/27/2013 2:29 PM, Rob T wrote:
>> If bools are 1 bit ints, then why do we have 'true' and 
>> 'false' as keywords?
>
> Because writing cast(bool)0 and cast(bool)1 is unappealing.

That cannot be the main reason. There must be a more fundamental 
reason for having true and false (which is inconsistent with 
ints) instead of 1b and 0b (which is consistent with ints).

--rt


More information about the Digitalmars-d mailing list