On Jan 10, 2009, at 2:10 AM, Bill Bumgarner wrote:
On Jan 9, 2009, at 7:11 PM, Ashley Clark wrote:
This should apply to NSNumber and NSDecimalNumber too right? Yet
the NSNumber +numberWith... methods are declared to return
(NSNumber *) and when called on NSDecimalNumber they return
NSDecim
On Jan 9, 2009, at 7:11 PM, Ashley Clark wrote:
This should apply to NSNumber and NSDecimalNumber too right? Yet the
NSNumber +numberWith... methods are declared to return (NSNumber *)
and when called on NSDecimalNumber they return NSDecimalNumber
objects which then have to be typecast.
Th
This should apply to NSNumber and NSDecimalNumber too right? Yet the
NSNumber +numberWith... methods are declared to return (NSNumber *)
and when called on NSDecimalNumber they return NSDecimalNumber objects
which then have to be typecast.
__
Ashley
On Jan 9, 2009, at 7:45 PM, mmalc Cr
+[NSMutableArray array] returns a mutable array. That's the reason the
return type is + (id) and not + (NSArray *).
When implementing connivence initializers, you should invoke [self
alloc], not [ASpecificClass alloc]. Cocoa uses this pattern
frequently, and you can safely depend on it.
O
On Jan 9, 2009, at 5:40 PM, Graham Cox wrote:
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
On Fri, Jan 9, 2009 at 8:40 PM, Graham Cox wrote:
> 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, NSMutableArr
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'
On Fri, Jan 9, 2009 at 6:39 PM, Ken Thomases wrote:
> And the reason many people don't realize they can do this is that they
> overlook the superclass methods when considering a subclass. A lot of
> people don't even know that they can send +array to NSMutableArray!
Part of the problem that was
On Jan 9, 2009, at 8:11 AM, Graham Cox wrote:
On 10 Jan 2009, at 1:07 am, Steve Cronin wrote:
Under some circumstances I'm not sure how big a mutable object
might need be.
So is there any guidance on coming up with a value for capacity?
[...]
It feels a little like premature optimization,
On 10 Jan 2009, at 1:07 am, Steve Cronin wrote:
Folks;
Under some circumstances I'm not sure how big a mutable object might
need be.
So is there any guidance on coming up with a value for capacity?
Assume for these cases that reasonable guesses range from say 2 -
5000...
I assume it's
Folks;
Under some circumstances I'm not sure how big a mutable object might
need be.
So is there any guidance on coming up with a value for capacity?
Assume for these cases that reasonable guesses range from say 2 -
5000...
I assume it's wasteful to just do a land grab with +arrayWithCapa
11 matches
Mail list logo