comp.lang.ada
 help / color / mirror / Atom feed
* Importance of Polymorphism
@ 1998-02-10  0:00 Nick Roberts
  1998-02-10  0:00 ` Brian Rogoff
  0 siblings, 1 reply; 5+ messages in thread
From: Nick Roberts @ 1998-02-10  0:00 UTC (permalink / raw)



In a recent article <34DB9059.7E4E@mcc.com> (a wonderfully comprehensive
reply to a question about inheritance), Matthew Heaney (mheaney@ni.net)
states that the polymorphism which Ada 95 adds to Ada 83 is really just an
adjunct to the data abstraction facilities already there.

I'm not really disagreeing with him :-) -- the data abstraction is the
basis for all the other 'object-oriented' facilities -- but I do think that
there is a little more significance to the introduction of _dynamic_
polymorphism than just as an 'adjunct'.

It's the world's most contended subject, I get the impression, but my own
take on it is: I believe it is dynamic polymorphism which really defines
the _key_ advantage of object oriented programming.  It's perhaps not so
obvious in a compiled language such as Ada, especially where there is not
(yet) a culture of using dynamic polymorphism very heavily.

But, in a language, such as SmallTalk for example, in which objects are so
heavily used that, in practice, dynamic polymorphism becomes deeply imbued
in the language, its importance is easy to appreciate.  Try to remove it
from SmallTalk, and the whole language would completely fall down.  It just
wouldn't work.  In addition, I reckon dynamic polymorphism is the only
truly unique feature of object orientation; it has lots of other features,
but they can all be found in prior techniques.

In the future, it may well be that Ada gets rather like SmallTalk --
especially considering the fact that computers in the future are going to
be immensely powerful (even pocket organisers etc.).  Libraries will be
built on other libraries, stacked up many, many levels deep, and the use of
inheritance (rather than just wholesale redefinition) will become much more
prevalent.  At this point, dynamic polymorphism will start to become really
vital, as libraries are supplied in pre-compiled form (or where a total
rebuild could take weeks!).

-- 

== Nick Roberts ================================================
== Croydon, UK                       ===========================
==                                              ================
== Proprietor, ThoughtWing Software                   ==========
== Independent Software Development Consultant            ======
== Nick.Roberts@dial.pipex.com                              ====
== Voicemail & Fax +44 181-405 1124                          ===
==                                                            ==
==           I live not in myself, but I become               ==
===          Portion of that around me; and to me             ==
====         High mountains are a feeling, but the hum        ==
=======      Of human cities torture.
===========                             -- Byron [Childe Harold]





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1998-02-12  0:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-02-10  0:00 Importance of Polymorphism Nick Roberts
1998-02-10  0:00 ` Brian Rogoff
1998-02-10  0:00   ` Jon S Anthony
1998-02-10  0:00     ` Brian Rogoff
1998-02-12  0:00       ` Jon S Anthony

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox