Re: [NSMutableArray array]
Re: [NSMutableArray array]
- Subject: Re: [NSMutableArray array]
- From: Shawn Erickson <email@hidden>
- Date: Thu, 8 Apr 2010 10:28:10 -0700
On Thu, Apr 8, 2010 at 10:21 AM, Patrick M. Rutkowski
<email@hidden> wrote:
> Agreed, but there's always the danger the +array method, which might
> actually be implemented in NSArray.m, will not properly initialize the
> more specific NSMutableArray object.
A correct subclass MUST ensure that things are correctly initialized
otherwise document that it doesn't do that.
> Of course, in this specific case that's the case, but it might be the
> case with other class hierarchies.
It would be a poorly implemented if that was the case and either
should be reworked or clearly documented.
> But, nonetheless I'm troubled that nobody in this thread has acknowledged that yet :-o
Not acknowledged what? You can always write buggy code that doesn't
conform to expectations / conventions... the goal is to not do that.
-Shawn
_______________________________________________
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