Re: Cocoa coding style (was Re: Did I reinvent the wheel?)
Re: Cocoa coding style (was Re: Did I reinvent the wheel?)
- Subject: Re: Cocoa coding style (was Re: Did I reinvent the wheel?)
- From: "Clark Cox" <email@hidden>
- Date: Sat, 10 May 2008 00:30:55 -0700
On Fri, May 9, 2008 at 7:41 PM, Chris Hanson <email@hidden> wrote:
> On May 9, 2008, at 11:10 AM, Western Botanicals wrote:
>
>
> (5) The Objective-C type is BOOL, not bool. The latter is a C++ type.
A minor nit to pick: bool (aka _Bool) is not exclusive to C++(as of
C99 it's a C type as well), and has some useful properties, especially
when assigning to/from other integer types.
> It
> will be unfamiliar to Objective-C developers and what's vastly more
> important, it may @encode differently than the Objective-C type does.
Not only may it @encode differently, it *will* do so. _Bool/bool is
guaranteed to be a different type than BOOL (which is typedef'd to
char).
--
Clark S. Cox III
email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden