gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFA]: BOOL coding standards (Was: Problem with+numberWithBool:?)


From: Alexander Malmberg
Subject: Re: [RFA]: BOOL coding standards (Was: Problem with+numberWithBool:?)
Date: Mon, 02 Feb 2004 19:11:38 +0100

Richard Frith-Macdonald wrote:
> On 1 Feb 2004, at 03:05, Alexander Malmberg wrote:
> > But BOOL isn't a boolean type. _Bool is.
> 
> I'm obviously not making myself clear.
> I believe that BOOL was intended to be a true boolean type, 
[...]

No, this is very clear. I just think you're wrong.

Basically, you're claiming that BOOL may only take the values YES and
NO, and that anything else is incorrect. I think this is wrong. I think
you're trying to read an intent into the "objective-c manual" that
likely isn't there, and an intent that at any rate is inconsistent with
the conventions of underlying language, current implementations, and
current use.

I maintain that BOOL is a c boolean like any other. All values that can
be stored in it are valid. 0 (aka. NO) is false, all others are true.
Code which uses values other than 1 (aka. YES) is perfectly correct
(style is different issue). GNUstep should accept all values silently
and correctly. No warnings, no exceptions.

[snip]
> I guess I've been influenced by Java ... 

It is interesting that you should mention Java. This kind of thinking is
something I associate with Java, and is one of the reasons I stay away
from it. I don't want to see it come to objective-c or GNUstep.

- Alexander Malmberg




reply via email to

[Prev in Thread] Current Thread [Next in Thread]