[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem with +numberWithBool: ?
From: |
Pascal J . Bourguignon |
Subject: |
Re: Problem with +numberWithBool: ? |
Date: |
Sat, 31 Jan 2004 00:15:35 +0100 |
Alexander Malmberg writes:
> Nicola Pero wrote:
> > > It isn't an implementation detail since it means that BOOL isn't a true
> > > boolean type. Compare this with c99's _Bool, which is a true boolean
> > > type:
> >
> > It's nice you mention the c99's boolean type; I suppose it would make
> > sense to try have BOOL as compatible as possible with the c99's bool type,
> > hoping that at some point they will be merged.
>
> I disagree. BOOL isn't a true boolean, and should remain that way. Those
> who want to use _Bool in their own code can just go ahead and do that
> (it'll interoperate just fine with BOOL).
>
> If, at some point in the distant future, BOOL falls out of use and c99
> is supported everywhere, we could redefine GNUstep's interface using
> _Bool, and deprecate and later remove BOOL completely.
It seems to be that if an OpenStep implementation defined:
#define BOOL _Bool
#define NO 0
#define YES 1
it would be a "conformant" OpenStep implementation.
Indeed, up to now, BOOL was defined as a type unsigned char, but the
only "legal" values for it have always been defined as being YES (1)
and NO (0). Any code that would store in a BOOL something else should
be declared non conformant, and the sooner we detect (break) it, the
better.
--
__Pascal_Bourguignon__ http://www.informatimago.com/
There is no worse tyranny than to force a man to pay for what he doesn't
want merely because you think it would be good for him.--Robert Heinlein
http://www.theadvocates.org/
- Re: [RFA]: BOOL coding standards (Was: Problem with +numberWithBool: ?), (continued)
- Re: [RFA]: BOOL coding standards (Was: Problem with +numberWithBool: ?), Richard Frith-Macdonald, 2004/01/30
- Re: [RFA]: BOOL coding standards (Was: Problem with +numberWithBool: ?), Richard Frith-Macdonald, 2004/01/30
- Re: [RFA]: BOOL coding standards (Was: Problem with +numberWithBool: ?), Adam Fedor, 2004/01/30
- Re: [RFA]: BOOL coding standards (Was: Problem with +numberWithBool: ?), Sheldon Gill, 2004/01/31
- Re[2]: [RFA]: BOOL coding standards (Was: Problem with +numberWithBool: ?), Manuel Guesdon, 2004/01/31
- Re: [RFA]: BOOL coding standards (Was: Problem with+numberWithBool: ?), Alexander Malmberg, 2004/01/31
- Re: Problem with +numberWithBool: ?, Alexander Malmberg, 2004/01/30
- Re: Problem with +numberWithBool: ?, Nicola Pero, 2004/01/30
- Re: Problem with +numberWithBool: ?, Alexander Malmberg, 2004/01/30
- Re: Problem with +numberWithBool: ?, Philippe C.D. Robert, 2004/01/30
- Re: Problem with +numberWithBool: ?,
Pascal J . Bourguignon <=
- Re: Problem with +numberWithBool: ?, Richard Frith-Macdonald, 2004/01/30
- Re: Problem with +numberWithBool: ?, Pascal J . Bourguignon, 2004/01/30
- Re[2]: Problem with +numberWithBool: ?, Manuel Guesdon, 2004/01/30