Re: Why are BOOL and bool distinct types?
Re: Why are BOOL and bool distinct types?
- Subject: Re: Why are BOOL and bool distinct types?
- From: "Sean McBride" <email@hidden>
- Date: Wed, 8 Jun 2005 10:57:16 -0400
- Organization: Rogue Research
On 2005-06-08 09:33, Fritz Anderson said:
>> Maybe BOOL should be deprecated now that C99 has a native type?
>
>No. BOOL is 8 bits on all platforms; bool is 32 bits on ppc and 8
>bits on i386. Native type != better.
I don't really follow your point. The language does not insist on a
size of 'bool' just like the size of 'int' is not fixed. So the
programmer should not rely on the size (ex for saving/transmitting
structs). Also, 'bool' is not always 32 bits on PPC, both CodeWarrior
and gcc have settings to make it 1 or 4 bytes.
It seems to me Obj-C only has 'BOOL' because there was no 'bool' at the
time. I mean, they did not add 'INT' and 'CHAR' to Obj-C, why not?
Because C had 'int' and 'char'! I think if Obj-C were made now 'BOOL'
would not be created.
Anyway, this discussion is silly, 'BOOL' can't go away for compatibility
reasons. But I agree with the OP that it is annoying that it exists.
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden