• 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: Public API method naming for NSString * / const char * parameters
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Public API method naming for NSString * / const char * parameters


  • Subject: Re: Public API method naming for NSString * / const char * parameters
  • From: Uli Kusterer <email@hidden>
  • Date: Mon, 03 Mar 2014 18:48:34 +0100

On 03 Mar 2014, at 17:09, email@hidden wrote:
> Commonly the char *strings represent a C# identifier http://msdn.microsoft.com/en-us/library/aa664670.aspx


I can't answer this for you, but should it even be exposed in the API that it is a string? Think of SEL. Under the hood, it is still implemented as a (uniqued) string constant. Still, you're expected to use other functions to generate these things (NSSelectorFromString or objc_selectorNamed or whatever it's called). So maybe it would be better to typedef them to void* or if they're not actually constant, to wrap them in another object that allocates/releases them.

-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."



_______________________________________________

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: 
 >Public API method naming for NSString * / const char * parameters (From: "email@hidden" <email@hidden>)
 >Re: Public API method naming for NSString * / const char * parameters (From: Daniel DeCovnick <email@hidden>)
 >Re: Public API method naming for NSString * / const char * parameters (From: "email@hidden" <email@hidden>)

  • Prev by Date: Re: Public API method naming for NSString * / const char * parameters
  • Next by Date: Re: Public API method naming for NSString * / const char * parameters
  • Previous by thread: Re: Public API method naming for NSString * / const char * parameters
  • Next by thread: Re: Public API method naming for NSString * / const char * parameters
  • Index(es):
    • Date
    • Thread