2015-06-30 14:05 GMT+02:00 Sean P. DeNigris <[email protected]>: > Thierry Goubier wrote > > I consider that subclassing should be used for implementation reuse and > > not for subtyping. > > That is the GoF position and it makes a lot of sense to me. In fact, I > think > we Smalltalkers suffer from McLuhan's "people become their tools" syndrome > in that, because the browser makes it easy to view inheritance trees, we > confuse inheritance with subtyping, creating unnecessary coupling. This > also > adds to the "Smalltalk has no APIs" problem; when only subclasses are > considered subtypes, one never has to define what is and is not the public > API; protocols could help here, but have never really been fleshed out for > this purpose and are a mess right now due to overloading with extension > method duties. >
I'll wonder what could be done with Traits about that. Traits may be better at establishing an API. Tools could do more to hide the extension thing; I still can't understand why, more than two years after I did it, all Pharo users are still writing their * a-long-package-name by hand. I would hate having to explain to Pharo beginners how to make a method an extension. (by the way, dropping a method on a package is a nice way to get a DNU in Nautilus on Pharo 4...) Thierry
