• 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: understanding conversions between CF and NS datatypes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: understanding conversions between CF and NS datatypes


  • Subject: Re: understanding conversions between CF and NS datatypes
  • From: Negm-Awad Amin <email@hidden>
  • Date: Thu, 4 Sep 2008 19:40:38 +0200


Am Do,04.09.2008 um 18:27 schrieb Michael Ash:

On Thu, Sep 4, 2008 at 10:41 AM, Negm-Awad Amin <email@hidden > wrote:

Am Sa,30.08.2008 um 05:22 schrieb Michael Ash:

Ultimately the most important thing to understand about toll-free
bridging (the link between CF and NS data types) is that you don't
have to convert anything. You *can't* convert anything. Because they
aren't two different things. An NSArray *is* a CFArray. An
NSMutableArray is a CFMutableArray. They are just two different names
for the same type.

I'm not sure, whether this is completly correct. I would prefer to say, that
are two different names of two different types, which are interchangeable.

No, they are the same type.

But AFAIK in some (rare) cases, CF and NS behaves differently.

Meaningless. You can subclass NSArray and get whatever behavior you want. The result is still an NSArray (and still a CFArray).

Mike
But I wouldn't say, that a subclass of a baseclass is the same type as the baseclass. You can assign a subclass instacne to a baseclass pointer and there is no casting, so indeed the situation is similiar to NSArray and CFArray.

But saying, that assigning proves the type identity (correct word?) …

Cheers,
Amin

_______________________________________________

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

Amin Negm-Awad 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


  • Follow-Ups:
    • Re: understanding conversions between CF and NS datatypes
      • From: "Michael Ash" <email@hidden>
References: 
 >Re: understanding conversions between CF and NS datatypes (From: Negm-Awad Amin <email@hidden>)
 >Re: understanding conversions between CF and NS datatypes (From: "Michael Ash" <email@hidden>)

  • Prev by Date: Re: Can I get a FILE* from Cocoa (NSFileHandle )?
  • Next by Date: Re: Can I get a FILE* from Cocoa (NSFileHandle )?
  • Previous by thread: Re: understanding conversions between CF and NS datatypes
  • Next by thread: Re: understanding conversions between CF and NS datatypes
  • Index(es):
    • Date
    • Thread