• 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: Toll-free bridge type at runtime
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Toll-free bridge type at runtime


  • Subject: Re: Toll-free bridge type at runtime
  • From: Michael Ash <email@hidden>
  • Date: Fri, 3 Apr 2009 16:24:18 -0400

On Fri, Apr 3, 2009 at 12:15 PM, Marcel Weiher <email@hidden> wrote:
>
> On Apr 3, 2009, at 9:06 , Michael Ash wrote:
>
> Of *course* I mean NSArray itself. What did you *think* I meant?
> Whenever I say NSArray I mean, hello, NSArray.
>
> That's what I thought, thanks for clarifying!  I was getting worried there
> for a bit...
>
> And it is *not* pointless. Every instance of a subclass of NSArray is
> also an instance of NSArray. This is *basic* object-oriented
> programming concepts here.
>
> Yes, that was exactly what I was saying:
> If you by NSArray you mean "every instance of a subclass of NSArray", then
> NSArray = CFArray is simply false, and it is trivial to distinguish NSArrays
> from CFArrays in the general case both at compile time and at runtime, as
> the code I posted here shows conclusively.

What I'm saying is that NSArray == CFArray, based on behavior. Thus it
is impossible to distinguish them, and nonsensical to want to.

As far as I can tell, what you're saying is that NSCFArray == CFArray.
In which case it is *still* impossible to distinguish an NSArray from
a CFArray, and still nonsensical to want to.

But clearly that is not correct, since you keep saying that it is
trivial to distinguish them. So, please fill out the following
function:

NSString *IsNSOrCFArray(id foo) // returns @"NSArray" or @"CFArray"
{
    ....
}

And also please indicate what this function should return for
IsNSOrCFArray([NSArray array]).

Mike
_______________________________________________

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: 
 >Toll-free bridge type at runtime (From: Ryan Joseph <email@hidden>)
 >Re: Toll-free bridge type at runtime (From: Marcel Weiher <email@hidden>)
 >Re: Toll-free bridge type at runtime (From: Michael Ash <email@hidden>)
 >Re: Toll-free bridge type at runtime (From: Marcel Weiher <email@hidden>)
 >Re: Toll-free bridge type at runtime (From: Michael Ash <email@hidden>)
 >Re: Toll-free bridge type at runtime (From: Marcel Weiher <email@hidden>)
 >Re: Toll-free bridge type at runtime (From: Michael Ash <email@hidden>)
 >Re: Toll-free bridge type at runtime (From: Marcel Weiher <email@hidden>)
 >Re: Toll-free bridge type at runtime (From: Michael Ash <email@hidden>)
 >Re: Toll-free bridge type at runtime (From: Marcel Weiher <email@hidden>)

  • Prev by Date: Best Practice for reading a string with NSScanner
  • Next by Date: Re: Linking the "document edited" flag to the Undo menu item state
  • Previous by thread: Re: Toll-free bridge type at runtime
  • Next by thread: Re: Toll-free bridge type at runtime
  • Index(es):
    • Date
    • Thread