Re: Mutability
Re: Mutability
- Subject: Re: Mutability
- From: "John C. Randolph" <email@hidden>
- Date: Thu, 22 Nov 2001 12:05:29 -0800
On Thursday, November 22, 2001, at 11:24 AM, Andrew Pinski wrote:
What about mutable=[array respondsToSelector:@selector(addObject:)]; ?
Then you don't have to worry about customs classes, that someone might
send to you.
This is not really that hackish.
How about:
@interface NSArray (mutability)
- (BOOL) isMutable;
@end
@implementation NSArray (mutability)
- (BOOL) isMutable { return NO; }
@end
@implementation NSMutableArray (mutability)
- (BOOL) isMutable { return YES; }
@end
"These kids today don't know the simple joy of saving four bytes of
page-0 memory on a 6502" - unknown