Re: Warning
Michael Doubez wrote:
I wouldn't go as far as say it is flawed, it just that IMO is-a has
just the dose of familiarity that makes it dangerous: it lets you
believe you can think in terms of concept and map them with the
programming language.
You just have to understand what "is-a" means. It has to do with
abstraction levels.
The answer to the "is a circle an ellipse, or is an ellipse a circle"
problem is simple: Neither. Not from an object-oriented design point of
view. Both a circle and an ellipse are at the *same* abstraction level
and hence they do not share a direct inheritance relationship. The
relationship between a circle and an ellipse is the same as the
relationship between a circle and a square: They may both be drawing
primitives, but otherwise they are not directly related.
In a message passing programming language, there is no necessity for
GUI elements to share a common base type, they only need to implement
a common interface (spacial placement, observable, GUI event
observer ...)
I see no relevant difference from an OO design point of view.
Different technologies, same design principles. "Common interface" is,
basically, the exact same thing as "common base type", from a design
point of view.
--- news://freenews.netfront.net/ - complaints: news@netfront.net ---