A modest proposal... DOCUMENT!
Stefan Matthias Aust
sma at 3plus4.de
Sat Feb 19 11:59:05 UTC 2000
At 21:44 17.02.00 +0000, Charles-A. Rovira wrote:
>The lack of documentation as to the intent of a class [...] are the
>biggest hurdles to overcome.
I think, we all agree here. Now we need to act.
> ...you need to and be ruthless in the application of the six reason
> to subclass...
I'd like to offer my simpler (slightly contracting rules)
1. Use inheritance to reuse code
2. Allways think about delegation first
So if I need something that's for example stream-like or dictionary-like I
most often subclass from Object and implement the methods which are what
I'd call stream-like or dictionary-like. Unfortunately, this isn't better
formalized.
I'm not so strict that I wouldn't allow a few "self shouldNotImplement" if
you could otherwise reuse a lot of code but in general I agree with Charles.
bye
--
Stefan Matthias Aust // ...dancing on the Darkside of the Moon
More information about the Squeak-dev
mailing list
|