• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Mutability
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Mutability
      • From: Ondra Cada <email@hidden>
References: 
 >Re: Mutability (From: Andrew Pinski <email@hidden>)

  • Prev by Date: Re: automatic spell checking
  • Next by Date: Re: Mutability
  • Previous by thread: Re: Mutability
  • Next by thread: Re: Mutability
  • Index(es):
    • Date
    • Thread