From: Phlip on
Gerry Quinn wrote:

> If you are writing a monolithic piece of software to perform some task,
> and things like GUI controls are not involved, you may very well know
> what type (as distinct from a generalised 'value') every object is
> anyway. If so, polymorphism will not bring anything useful to the
> table. Likely enough most of what the OP has been working on is of
> this type.

Polymorphism will help fold redundancies together - if any.

Unless you want to take on _all_ the /Design Patterns/ books...

> To say "OO is about polymorphism", in short, is nonsense.

Definitions, in engineering, should be short, useful, and distinct. Long
rambling definitions don't help discussions.

--
Phlip
http://www.c2.com/cgi/wiki?ZeekLand


From: topmind on
> Polymorphism will help fold redundancies together - if any.

There are multiple ways to do such. Polymorphism usually (not always)
seems to assume that things nicely fit into a mutually-exclusive list
of categories or a hierarchy of variations. However, in the real world
things are often not so clean. There is no Tree Cop to keep things
nice.

Polymorphism has a *big rework-cost* to go from IS-A to HAS-A when
hierarchies or mutual exclusion fail to provide a sufficient modeling
statement. In other words, poly it does not bend with the shape of
real-world changes as I observe them.

-T-
oop.ismad.com

From: Gerry Quinn on
In article <u%ipe.2164$jS1.720(a)newssvr17.news.prodigy.com>,
phlip_cpp(a)yahoo.com says...
> Gerry Quinn wrote:
>
> > If you are writing a monolithic piece of software to perform some task,
> > and things like GUI controls are not involved, you may very well know
> > what type (as distinct from a generalised 'value') every object is
> > anyway. If so, polymorphism will not bring anything useful to the
> > table. Likely enough most of what the OP has been working on is of
> > this type.
>
> Polymorphism will help fold redundancies together - if any.

It can help that. Sometimes. As 'topmind' observes, it can also trap
you somewhere you don't want to be.

> Unless you want to take on _all_ the /Design Patterns/ books...
>
> > To say "OO is about polymorphism", in short, is nonsense.
>
> Definitions, in engineering, should be short, useful, and distinct. Long
> rambling definitions don't help discussions.

In the first sentence, you left out "correct".

- Gerry Quinn


From: Robert C. Martin on
On Tue, 07 Jun 2005 15:25:14 GMT, "Phlip" <phlip_cpp(a)yahoo.com> wrote:

>Gerry Quinn wrote:

>> To say "OO is about polymorphism", in short, is nonsense.

This was cross posted to comp.object, so I'm not sure of the context.
Taken on its own, the above statement is less than accurate.

OO has many defining traits such as encapsulation, inheritance, and
polymorphism. However, the one trait that is present in all OO
incarnations without modification is polymorphism. All the others are
quite variable. For example, inheritance means very different things
in different OO languages. In Smalltalk it's minor convenience,
whereas in Java it is a critical necessity *because* it enables
polymorphism. In C++ encapsulation boundaries are enforced by
'private' and 'protected' keywords. Other languages use those
keywords in subtly different ways. Yet other languages don't have
them, and don't enforce encapsulation.

The bottom line for OO is that it is a technique for managing
dependencies and reducing coupling; and the primary tool for achieving
that is polymorphism.



-----
Robert C. Martin (Uncle Bob) | email: unclebob(a)objectmentor.com
Object Mentor Inc. | blog: www.butunclebob.com
The Agile Transition Experts | web: www.objectmentor.com
800-338-6716


"The aim of science is not to open the door to infinite wisdom,
but to set a limit to infinite error."
-- Bertolt Brecht, Life of Galileo
From: Robert C. Martin on
On Wed, 8 Jun 2005 11:50:50 +0100, Gerry Quinn
<gerryq(a)DELETETHISindigo.ie> wrote:

>> Polymorphism will help fold redundancies together - if any.
>
>It can help that. Sometimes. As 'topmind' observes, it can also trap
>you somewhere you don't want to be.

Polymorphism is a tool, not a solution. Topmind rails against the
tool because there are cases where it doesn't work well. I, for one,
am glad I have the tool.



-----
Robert C. Martin (Uncle Bob) | email: unclebob(a)objectmentor.com
Object Mentor Inc. | blog: www.butunclebob.com
The Agile Transition Experts | web: www.objectmentor.com
800-338-6716


"The aim of science is not to open the door to infinite wisdom,
but to set a limit to infinite error."
-- Bertolt Brecht, Life of Galileo
 |  Next  |  Last
Pages: 1 2 3 4 5 6 7 8 9 10 11
Next: Use Case Point Estimation