• 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: Declaring a property named "private" and ObjC++
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Declaring a property named "private" and ObjC++


  • Subject: Re: Declaring a property named "private" and ObjC++
  • From: Dave Carrigan <email@hidden>
  • Date: Tue, 28 Sep 2010 17:10:28 -0700

On Sep 28, 2010, at 4:57 PM, Nick Zitzmann wrote:
>
> On Sep 28, 2010, at 5:51 PM, Ricky Sharp wrote:
>
>> Why do you need to use the exact name of "private"?
>
> Because the object in question has a "private" state.
>
>> You should never name things using reserved words.
>
> But it's not a reserved word in Objective-C. "@private" is, "private" is not.


Objective-C != Objective-C++

And it is a reserved word in Objective-C++.

In addition, even if it were just Objective-C, it is still not generally good practice to use C++ reserved words (class, private, etc.).

--
Dave Carrigan
email@hidden
Seattle, WA, USA

_______________________________________________

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

  • Follow-Ups:
    • Re: Declaring a property named "private" and ObjC++
      • From: Nick Zitzmann <email@hidden>
References: 
 >Declaring a property named "private" and ObjC++ (From: Nick Zitzmann <email@hidden>)
 >Re: Declaring a property named "private" and ObjC++ (From: Ricky Sharp <email@hidden>)
 >Re: Declaring a property named "private" and ObjC++ (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: Re: Declaring a property named "private" and ObjC++
  • Next by Date: Re: Declaring a property named "private" and ObjC++
  • Previous by thread: Re: Declaring a property named "private" and ObjC++
  • Next by thread: Re: Declaring a property named "private" and ObjC++
  • Index(es):
    • Date
    • Thread