• 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: Outline and Table back to front
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Outline and Table back to front


  • Subject: Re: Outline and Table back to front
  • From: Thomas Davie <email@hidden>
  • Date: Mon, 20 Jun 2005 19:29:30 +0100


On Jun 20, 2005, at 7:21 PM, Andy Lee wrote:

On Jun 20, 2005, at 2:05 PM, Thomas Davie wrote:

No subclass should ever add functionality,


If the superclass can already do everything, why have subclasses at all?
Because specific things are a lot easier to deal with than very abstract things

because this breaks the "is a" relationsip...


I think this is kind of a silly debate over semantics -- which I'm now about to join...


"Adding" and "subtracting" isn't the right way to think about it. A subclass *specializes* its superclass. "Specializing" can mean "adding" the ability to perform certain kinds of calculations, or store certain kinds of data (via a little thing called ivars), or respond differently to method requests than the superclass does, or impose certain invariants (like a square is a rectangle with the invariant that width == height).

There are cases where you could argue either way for which is the superclass and which is the subclass -- or whether there should have been a third base class that they both should have inherited from.

I think it's at least a reasonable solution that NSOutlineView inherits from NSTableView. I think it's a little weird, though, to say "No subclass should ever add functionality."
Okay, point taken, but my query as you say is really a semantics based one - it makes much more sense for an table view to be a specialisation of an outline view, because all table views can easily be represented as outline views, Not all outline views can easily be implemented as a table view.

Bob
_______________________________________________
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


References: 
 >Re: Outline and Table back to front (From: Gorazd Krosl <email@hidden>)
 >Re: Outline and Table back to front (From: Thomas Davie <email@hidden>)
 >Re: Outline and Table back to front (From: Jesus De Meyer <email@hidden>)
 >Re: Outline and Table back to front (From: Thomas Davie <email@hidden>)
 >Re: Outline and Table back to front (From: Corbin Dunn <email@hidden>)
 >Re: Outline and Table back to front (From: Thomas Davie <email@hidden>)
 >Re: Outline and Table back to front (From: Bill Bumgarner <email@hidden>)
 >Re: Outline and Table back to front (From: Thomas Davie <email@hidden>)
 >Re: Outline and Table back to front (From: Andy Lee <email@hidden>)

  • Prev by Date: Re: Outline and Table back to front
  • Next by Date: Re: Outline and Table back to front
  • Previous by thread: Re: Outline and Table back to front
  • Next by thread: Re: Outline and Table back to front
  • Index(es):
    • Date
    • Thread