• 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: Class clusters - infinite loop?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Class clusters - infinite loop?


  • Subject: Re: Class clusters - infinite loop?
  • From: Wade Tregaskis <email@hidden>
  • Date: Sat, 25 Jun 2005 21:39:10 +1000

They're the bane of extensibility,

Says who? I extend arrays and dictionaries and strings functionality every day. Never encountered any problem at all.

Yeah, I should have been more specific in my original post. What I mean is, you can't subclass class clusters. At least, not without rewriting a significant portion of their functionality. Case in point is NSOutputStream - you're *encouraged* to subclass it, but it's a class cluster! In my subclass, I had to reimplement all of NSOutputStream's basic functionality! I mean, what the heck is the point of subclassing something if you have to rewrite it anyway? In my example, I might as well (and probably will) just make my own Stream superclass, and build my own little family of well-defined subclasses. But that's a big loss to interoperability... at least ObjC allows me to maintain runtime compatibility by using an identical interface, but still...


I understand the argument that class clusters give you advanced functionality transparently, and moreso are future-proof(ish) in this regard; that was the convenience I alluded to. But I think the same behaviour can be achieved using an appropriate factory class, which, while not entirely without it's own problems, still makes things easier for extensibility.

Wade Tregaskis (AIM/iChat, Yahoo & Skype: wadetregaskis, ICQ: 40056898, MSN: email@hidden, AV iChat & email: email@hidden, Jabber: email@hidden)
-- Sed quis custodiet ipsos custodes?


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Class clusters - infinite loop?
      • From: Ondra Cada <email@hidden>
References: 
 >Class clusters - infinite loop? (From: Steve Canfield <email@hidden>)
 >Re: Class clusters - infinite loop? (From: email@hidden)
 >Re: Class clusters - infinite loop? (From: Ondra Cada <email@hidden>)

  • Prev by Date: Re: Class clusters - infinite loop?
  • Next by Date: Re: Making Inspectors
  • Previous by thread: Re: Class clusters - infinite loop?
  • Next by thread: Re: Class clusters - infinite loop?
  • Index(es):
    • Date
    • Thread