Re: Toll-free bridge type at runtime
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