1 matches bool, 2 matches long
Rob T
alanb at ucora.com
Sun Apr 28 02:18:42 PDT 2013
On Sunday, 28 April 2013 at 09:05:06 UTC, 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.
I was wondering who was going to notice that elephant. I didn't
get a satisfactory answer to the question of why we have an int
type named bool with special keywords true and false, when if it
really is an int type, all we require is a type named bit with
nothing else needed other than what is already available with int
types.
bool is a very unusual beast, but why?
--rt
More information about the Digitalmars-d
mailing list