• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Cocoa coding style (was Re: Did I reinvent the wheel?)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Did I reinvent the wheel? (From: Western Botanicals <email@hidden>)
 >Cocoa coding style (was Re: Did I reinvent the wheel?) (From: Chris Hanson <email@hidden>)

  • Prev by Date: Re: Problem getting subclass of NSTextContainer working properly
  • Next by Date: Re: Sort
  • Previous by thread: Re: Cocoa coding style (was Re: Did I reinvent the wheel?)
  • Next by thread: Re: Cocoa coding style (was Re: Did I reinvent the wheel?)
  • Index(es):
    • Date
    • Thread