• 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: Objective-c Run-time headers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Objective-c Run-time headers


  • Subject: Re: Objective-c Run-time headers
  • From: Alastair Houghton <email@hidden>
  • Date: Fri, 6 Jul 2007 22:46:23 +0100

On 6 Jul 2007, at 22:38, Ofri Wolfus wrote:

On 06/07/2007, at 18:06, Alastair Houghton wrote:
I'd be inclined to make Objective-C object types implicitly pointer types, rather than always writing e.g. ^NSString as you would in ObjC itself.

Just for the record, the ability to treat a pointer to a "random" memory as an object and vice versa makes some really cool stuff possible. Toll free bridging works this way, the objc runtime itself uses some static structs for special classes, and I won't be surprised if NSCopyObject() also uses this fact and uses something like memcpy() to do its magic (of course it's not that easy but that's the idea).

I think you missed the point of my remark. I wasn't saying they shouldn't be pointer types, just that there wasn't any point in writing ^NSString rather than NSString. Or, in C language terms, I'm advocating something like


  typedef NSStringImpl *NSString;

(But only for Objective Pascal; Objective-C already made the choice to write pointers explicitly except for "id", which is implicitly a pointer.)

Kind regards,

Alastair.

--
http://alastairs-place.net




_______________________________________________

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: 
 >Objective-c Run-time headers (From: "Felipe Monteiro de Carvalho" <email@hidden>)
 >Re: Objective-c Run-time headers (From: Ronald Oussoren <email@hidden>)
 >Re: Objective-c Run-time headers (From: "Felipe Monteiro de Carvalho" <email@hidden>)
 >Re: Objective-c Run-time headers (From: Alastair Houghton <email@hidden>)
 >Re: Objective-c Run-time headers (From: Ofri Wolfus <email@hidden>)

  • Prev by Date: Re: Objective-c Run-time headers
  • Next by Date: Re: Problem with bindings and cleaning up a view
  • Previous by thread: Re: Objective-c Run-time headers
  • Next by thread: Re: Objective-c Run-time headers
  • Index(es):
    • Date
    • Thread