1 matches bool, 2 matches long

Walter Bright newshound2 at digitalmars.com
Sun Apr 28 23:26:43 PDT 2013


On 4/28/2013 2:05 AM, deadalnix wrote:
> 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.
>
> VRP say you don't need to.

You're implying there is no need for 1L or 1U either, but there is.

The other reason, mentioned before, is that without making them a keyword or 
standard type, people will inevitably create their own in one of many different, 
incompatible, ways.


More information about the Digitalmars-d mailing list