Re: Objective-c Run-time headers
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