[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFA]: BOOL coding standards (Was: Problemwith+numberWithBool:?)
From: |
Alexander Malmberg |
Subject: |
Re: [RFA]: BOOL coding standards (Was: Problemwith+numberWithBool:?) |
Date: |
Tue, 03 Feb 2004 00:59:39 +0100 |
Nicola Pero wrote:
> > Basically, you're claiming that BOOL may only take the values YES and
> > NO, and that anything else is incorrect.
>
> The Objective-C manual of NeXTstep 3.3 clearly states -
>
> "The principal types used in Objective C are defined in objc/objc.h. They
> are:
>
> id An object (a pointer to its data structure)
> Class A class object (a pointer to the class data structure)
> SEL A selector, a compiler-assigned code that identifies a method name
> IMP A pointer to a method implementation that returns an id
> BOOL A boolean value, either YES or NO"
>
> This precise definition
[snip]
This isn't anywhere close to being a precise definition! Applying the
same thing to "id", we find that:
id foo=nil;
is invalid, because nil isn't a pointer to a data structure for an
object, or that:
SEL s=sel_register_name("QUUX");
is invalid, because the "code" won't be assigned by the _compiler_.
Trying to be pedantic about details in statements as vague and
unspecified as this is just silly.
- Alexander Malmberg
Re: [RFA]: BOOL coding standards (Was: Problem with+numberWithBool:?), Alexander Malmberg, 2004/02/02
- Re: [RFA]: BOOL coding standards (Was: Problem with+numberWithBool:?), Nicola Pero, 2004/02/02
- Re: [RFA]: BOOL coding standards (Was: Problemwith+numberWithBool:?),
Alexander Malmberg <=
- Re: [RFA]: BOOL coding standards (Was: Problemwith+numberWithBool:?), Nicola Pero, 2004/02/02
- Re: [RFA]: BOOL coding standards (Was: Problemwith+numberWithBool:?), David Ayers, 2004/02/03
- Re: [RFA]: BOOL coding standards (Was: Problemwith+numberWithBool:?), Richard Frith-Macdonald, 2004/02/03
- Re[2]: [RFA]: BOOL coding standards (Was: Problemwith+numberWithBool:?), Manuel Guesdon, 2004/02/03
- Re: [RFA]: BOOL coding standards (Was: Problemwith+numberWithBool:?), Alexander Malmberg, 2004/02/04
- Re: [RFA]: BOOL coding standards (Was: Problemwith+numberWithBool:?), Nicola Pero, 2004/02/04
- Re: [RFA]: BOOL coding standards (Was: Problemwith+numberWithBool:?), David Ayers, 2004/02/04
Re: [RFA]: BOOL coding standards (Was: Problemwith+numberWithBool:?), Alexander Malmberg, 2004/02/03
Re: [RFA]: BOOL coding standards (Was: Problemwith+numberWithBool:?), Richard Frith-Macdonald, 2004/02/03
Re: [RFA]: BOOL coding standards (Was: Problemwith+numberWithBool:?), Alexander Malmberg, 2004/02/03