[Pharo-project] Regarding SimpleMorphic
siguctua at gmail.com
Mon Apr 4 14:01:01 CEST 2011
On 31 March 2011 22:03, Stéphane Ducasse <stephane.ducasse at inria.fr> wrote:
>> I'm sure you really miss last year, but we're entering the second quarter of 2011 ;-)
>> Getting back to the technical part of your post, I also always tried to understand why in some cases we end up with this strange hierarchy
> people long time ago thought that inheritance = reuse.
It is strange, because i learned that inheritance is _specialization_.
And i actually haven't took much care about subtleties of this, before
i met smalltalk and start coding in it. It is in smalltalk, where it
become apparent to me:
- subclassing is not a way to "extend" a superclass, it is a way to
specialize a superclass.
>> (which you mock saying Car inherits from Wheel), specially if we take in account Smalltalk is a single inheritance language, so you have only a shot to specialize a given class.
>> Maybe the folks that did it in the past were less used to composing than inheriting and the second way saves writing some new methods to avoid breaking the Demeter principle?
> I'm quite sure that LOD was not their concern.
>> Perhaps understanding the "crucial incident" could lead us to better roadmap. . .
> No. We know design. We should just implement it.
Igor Stasenko AKA sig.
More information about the Pharo-project