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: David Ayers
Subject: Re: [RFA]: BOOL coding standards (Was: Problem with +numberWithBool: ?)
Date: Fri, 30 Jan 2004 17:54:30 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040113

Alexander Malmberg wrote:

I've attached a patch to our coding standards. OK to commit? If so, new
code will work ok, and I'll get to work on patching core/ (hopefully
with some help from David Ayers :).

Yes, I think I could slip this in somewhere. (Not that there aren't more imporatent things to do but this can be done rather mechanically and the diff should be pretty clear for identifying whether everything went well.)

The more stylistic / coding convention question to me is whether we want to

s/== YES/!= NO/g
if ([obj isKindOfClass: [SomeClass class] != NO)
or
s/== YES//g
if ([obj isKindOfClass: [SomeClass class])

I belive the GNU coding standards *used* to suggest the former, but I can't find it anymore and I kind of feel that testing truth by testing a double negative is a bit unintuative (but then again I also got used to if (obj != nil) ).

Making the change (either way) leads to more robust code and if no one disagrees I can do it. Just tell me which style we should use.

(In fact I'll take a look at -gdl2 and -gsweb also then.)

Cheers,
David





reply via email to

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