Re: A Question on estimating +arrayWithCapacity
Re: A Question on estimating +arrayWithCapacity
- Subject: Re: A Question on estimating +arrayWithCapacity
- From: Graham Cox <email@hidden>
- Date: Sat, 10 Jan 2009 12:40:15 +1100
On 10 Jan 2009, at 12:27 pm, Kyle Sluder wrote:
Part of the problem that was addressed in the previous thread was that
+array is not documented to actually give you a mutable instance.
While in practice it works fine, there's no guarantee.
Isn't guaranteed by the semantics of inheritance? I've specified the
class: [NSMutableArray ... and what I want it to give me... array];
And the fact that NSMutableArray inherits NSArray ensures that
anything that array can do, NSMutableArray can do.
--Graham
_______________________________________________
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