• 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: Subclass final class (Boolean) ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Subclass final class (Boolean) ?


  • Subject: Re: Subclass final class (Boolean) ?
  • From: Ian Joyner <email@hidden>
  • Date: Fri, 1 Sep 2006 10:11:04 +1000

On 30/08/2006, at 5:57 PM, Marcin Lukasiak wrote:

Private API are for framework/library/application implementator use - you
should even know that there is any method names X when it's private. Private
API's are private because implementators want to have some internal
structure that they will be able to easily change and usually private API
changes a lot. Normally I'd like to have some parts private to do not think
each time I change internals (because of optimization or whatever) if
someone don't relay on this.

That is a very good point, and is the brittle subclass problem. The project management way to get around it is to have a process marking classes as new, experimental, tested, mature, etc.


The next level is to be wise in your use of inheritance, you are quite correct, it only suits some problems and misuse will soon lead to problems, especially the brittle subclass problem.

The technical solution is design by contract, so that it will much more quickly become obvious that a subclass cannot honour the contracts of the parent class and so therefore inheritance is inappropriate. I find this a stronger and yet more flexible approach than Java's final and private, ensuring correct application of inheritance, without blanket ban.

Ian

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


References: 
 >RE: Subclass final class (Boolean) ? (From: "Marcin Lukasiak" <email@hidden>)

  • Prev by Date: WebObjects Builder 5.3.2 cannot save modified components with mobile users !
  • Previous by thread: Re: Subclass final class (Boolean) ?
  • Next by thread: Re: Subclass final class (Boolean) ?
  • Index(es):
    • Date
    • Thread