Traits approaching mainstream Squeak

Trygve Reenskaug trygver at ifi.uio.no
Thu Sep 1 08:18:43 UTC 2005


I started as a fan of inheritance; frameworks was the answer to the SW 
crisis. I later came to believe inheritance to be evil.

The turning point was when I discovered that I just couldn't deal with new 
versions of the VW class library from ParcPlaceSystems. There was an 
enormous tangle of dependencies between the library and our 300k lines of 
application code and we had to resort to testing to find what was broken 
with a new library version.

"Program testing can be used to show the presence of bugs, but never to 
show their absence!" (Dijkstra)

I find that readable code combined with peer review goes a long way to show 
the absence of bugs.

My conclusion:
¤  Inheritance is wonderful in the small when I can grasp all its aspects.
¤  Inheritance is evil in the large if I cannot rely on the superclasses 
remaining stable.

Cheers
--Trygve



At 07:36 01.09.2005, you wrote:
>Blake> I'm intrigued by the question of "is inheritance necessary"
>
>Perhaps a better question would be "Is inheritance optimal?"  Or even
>better: "When is inheritance optimal, and when is it not? And when it isn't,
>what alternatives are better?"
>
>--Alan


-- 

Trygve Reenskaug      mailto: trygver at ifi.uio.no
Morgedalsvn. 5A       http://heim.ifi.uio.no/~trygver
N-0378 Oslo           Tel: (+47) 22 49 57 27
Norway





More information about the Squeak-dev mailing list