• 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
Mutable classes and class clusters
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Mutable classes and class clusters


  • Subject: Mutable classes and class clusters
  • From: Rob Rix <email@hidden>
  • Date: Sat, 15 Sep 2001 15:48:58 -0400

Hello, all.

After some checking through the archives, I wasn't able to find the answers I wanted (*grin*), so I'm checking here now.

My questions:
1) What benefits do separate immutable and mutable classes provide? I'm developing a framework, and I'm wondering whether I should separate the mutable aspects of some of my classes into a mutable subclass.
It occurs to me that the rationale behind this decision might have been the fact that NSArray et al are class clusters. Is this the case?

2) One of the classes I'm implementing in my framework is about to be redesigned as a class cluster, with a single public class (unless I find that separating it into mutable and immutable would be worthwhile, of course). So, to make a class cluster, is all that is involved changing my class' -(id)init method so that it returns an instance of a private subclass? Should I also have said private subclasses report that they are actually members of the superclass when queried with things like -isMemberOfClass, -class, and +class?

Thanks very much,

-- Rob

If there's anything more important than my ego around, I want it caught and shot now. - Zaphod


  • Follow-Ups:
    • Re: Mutable classes and class clusters
      • From: Chris Kane <email@hidden>
    • Re: Mutable classes and class clusters
      • From: Peter Ammon <email@hidden>
    • Re: Mutable classes and class clusters
      • From: John Hörnkvist <email@hidden>
  • Prev by Date: Re: Determinate NSProgressIndicator without animation?
  • Next by Date: Re: Objective-Fortran
  • Previous by thread: Re: Odd crash/method call duplication? - Resolved...
  • Next by thread: Re: Mutable classes and class clusters
  • Index(es):
    • Date
    • Thread