comp.lang.ada
 help / color / mirror / Atom feed
From: sun-barr!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!darwin.sura.net! spool.mu.edu!hri.com!noc.near.net!inmet!spock!stt@decwrl.dec.com  (Tucker Taft)
Subject: Re: OOD, Ada, and Inheritance
Date: 11 Nov 92 04:20:43 GMT	[thread overview]
Message-ID: <1992Nov11.042043.9740@inmet.camb.inmet.com> (raw)

In article <1992Nov10.205810.5516@mcc.com> 
 breland@cobweb.mcc.com (Mark Breland) writes:

>In article <BxGpxt.FDw@cs.uiuc.edu> johnson@cs.uiuc.edu (Ralph Johnson) writes
:
>>
>>Just as serious a problem with Rosen's paper is the opinion that
>>polymorphism is optional and can be done by hand when needed.  ...
>>                           ...
>>...  Rosen seemed to contradict himself when he
>>talked about why Ada 9X wanted to add support for polymorphism, so
>>perhaps he doesn't really believe this, but was just trying to explain
>>why Ada was designed the way it was.  ...
>
>I saw no contradiction in Rosen's presentation of Ada 9X run-time
>polymorphism.  Rather, it appeared to me he stressed the flexibility
>of Ada 9X to allow *either* explicitly coded compile-time polymorphism
>*or* dynamic binding through tagged types.  Either mechanism may apply,
>at the whim of the initial designer.  See "Ada 9X: A Technical Summary"
>by S. Tucker Taft, also in Comms. of the ACM Nov92, for a detailed
>example of both paradigms.

Speaking for myself ;-), J. P. Rosen's views are somewhat different
from those of the Ada 9X Mapping/Revision Team.  We do believe
that inheritance with type extension and run-time polymorphism are
important additional capabilities, and in fact are more type safe
than the typical equivalent code based on variant records and
case statements.  And of course, the dynamic binding inherent
in run-time polymorphism opens up whole new ways of partitioning
a system into independent subsystems while still retaining type safety.
Since reusable and relatively independent subsystems are critical
to the productive construction of large systems, dynamic binding (run-time
polymorphism) is itself critical to this process.

And since most type-safe dynamic binding is based on the commonality
ensured through the rules of inheritance (at least of interface), 
the two are inseparable in most OOPLs.

>>. . . (Or inheritance is an addition to composition,
>>since composition was first.)
>
>Thank you for stating the above...that's the first time I have heard a
>staunch OO persona give credit to the evolution of object-oriented
>methods, rather than describe it as a radically new invention.

We also believe that object-oriented approaches are a natural
outgrowth of earlier work, in particular abstract-data-type (ADT)-oriented 
approaches.  The big thing that OO brings is robust support
for abstractions with *multiple* implementations.  Although the
concept of multiple implementations of a given abstract data type
was always discussed in academic circles, pre-OO languages with
abstract data types rarely had good support for multiple implementations.

Inheritance and run-time polymorphism make multiple implementations
for a given abstraction practical and workable, allowing code
to be written that works on any derivative of a given type just
as well as it works on the original "root" type of the hierarchy.
The "trick" is that each object carries enough information to identify
its own particular implementation, allowing automatic run-time dispatch
to the "appropriate" implementation of any given "primitive" operation
of the abstraction.  The only thing needed to ensure type safety
is that the operation exists with the given parameter profile;
the actual implementation of the operation need not be known (nor even
exist) at compile-time of the client of the operation.

In other words, the big step from "type-oriented" to "object-oriented"
is not the concept of abstraction, but rather the concept that an
object identifies its own implementation; its compile-time-known
type only identifies its interface.

>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>  Mark A. Breland             |    Microelectronics and Computer
>  Project Leader - AFT        |    Technology Corporation 
>  (512) 338-3509              |    3500 West Balcones Drive
>  breland@mcc.com             |    Austin, Texas 78759-6509
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

S. Tucker Taft     stt@inmet.com
Ada 9X Mapping/Revision Team
Intermetrics, Inc.
Cambridge, MA  02138

             reply	other threads:[~1992-11-11  4:20 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1992-11-11  4:20 sun-barr!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!darwin.sura.net! [this message]
  -- strict thread matches above, loose matches on Subject: below --
1992-12-04 20:49 OOD, Ada, and Inheritance Bruce Weide
1992-12-04  8:54 cis.ohio-state.edu!zaphod.mps.ohio-state.edu!darwin.sura.net!paladin.amer
1992-12-03 21:19 dog.ee.lbl.gov!overload.lbl.gov!agate!usenet.ins.cwru.edu!magnus.acs.ohio
1992-12-02 20:25 dog.ee.lbl.gov!network.ucsd.edu!usc!zaphod.mps.ohio-state.edu!cis.ohio-st
1992-12-02 14:58 pipex!bnr.co.uk!bnrgate!nott!cunews!cunews!knight
1992-11-20 20:28 klamath.cs.washington.edu!chambers
1992-11-17 20:37 dog.ee.lbl.gov!pasteur!agate!usenet.ins.cwru.edu!magnus.acs.ohio-state.ed
1992-11-16 15:09 eru.mt.luth.se!lunic!sunic!mcsun!uknet!comlab.ox.ac.uk!ajs
1992-11-16  8:48 cis.ohio-state.edu!zaphod.mps.ohio-state.edu!darwin.sura.net!Sirius.dfn.d
1992-11-13 22:45 klamath.cs.washington.edu!chambers
1992-11-13 20:37 Bruce Weide
1992-11-10 20:58 sun-barr!cs.utexas.edu!natinst.com!news.dell.com!milano!cobweb.mcc.com!br
1992-11-09 18:56 Ralph Johnson
1992-11-09 18:30 eru.mt.luth.se!lunic!sunic!lth.se!newsuser
1992-11-09 16:36 Jorge Luis Diaz-Herrera
1992-11-09 14:53 think.com!sdd.hp.com!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!elephan
1992-11-07 18:49 John Goodsen
1992-11-07  1:25 mole-end!mat
1992-11-06 20:13 John Goodsen
1992-11-06  9:00 agate!doc.ic.ac.uk!uknet!root44!hrc63!mrcu!paj
1992-11-05 19:20 David Emery
1992-11-05 19:09 saimiri.primate.wisc.edu!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!new
replies disabled

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