2015-06-30 11:30 GMT+02:00 Tudor Girba <[email protected]>:

> What he means is that just because subclassing is available as a technical
> mechanism, we should only use it for modeling subtyping and not
> implementation reuse (only in very few cases this is actually useful in the
> long run).
>

Given how Smalltalk defines types and subtyping, I consider that
subclassing should be used for implementation reuse and not for subtyping.
Any Smalltalk class hierarchy which has instance variables defined in the
superclass does implementation sharing/reuse.

Modeling is another consideration.

(I still consider the meaning of Stef phrase confusing...)


> For reference, this goes under the name of Liskov substitution principle
> and one nice article that explains it is this one:
> http://www.objectmentor.com/resources/articles/lsp.pdf
>

This reference is too much into how that particular principle turns out in
an ill-designed type and code sharing mechanism (C++) to be of much help ;)

Thierry


>
>
> Cheers,
> Doru
>
>
> On Tue, Jun 30, 2015 at 11:21 AM, Thierry Goubier <
> [email protected]> wrote:
>
>>
>>
>> 2015-06-30 11:00 GMT+02:00 stepharo <[email protected]>:
>>
>>>
>>>>
>>> What I mean is that this is not good to have subclassing when we can use
>>> subclassing.
>>>
>>
>> Are you sure you mean that? *confused*
>>
>> Thierry
>>
>
>
>
> --
> www.tudorgirba.com
>
> "Every thing has its own flow"
>

Reply via email to