comp.lang.ada
 help / color / mirror / Atom feed
From: cis.ohio-state.edu!elephant.cis.ohio-state.edu!weide@ucbvax.Berkeley.EDU  (Bruce Weide)
Subject: Re: OOD, Ada, and Inheritance
Date: 13 Nov 92 20:37:23 GMT	[thread overview]
Message-ID: <1992Nov13.203723.26049@cis.ohio-state.edu> (raw)

In article <1992Nov11.042043.9740@inmet.camb.inmet.com>
stt@spock.camb.inmet.com (Tucker Taft) writes:
>
>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.
>

Good point about multiple implementations, but you don't need OO
mechanisms like inheritance to get multiple implementations.  For
example, the idea of multiple implementations is a central feature of
RESOLVE, which has no OO features except a special kind of
specification inheritance that has no bearing on multiple
implementations.  In fact, it seems Ada could be extended with (direct
language support for) multiple implementations, e.g., by permitting
separate naming of package specs and bodies and a way of binding them
together at instantiation time.  See a paper by M. Sitaraman in Proc.
ICCL, Apr 1992, for some ideas on how this could be done.  Ada-9X
doesn't seem to use this approach as I understand it.  Is there a
problem because of some subtle Ada eccentricity that I'm not seeing?

Or, by multiple implementations, do you mean to insist on run-time
selection among different implementations?  If so, what examples would
you (e.g., Ralph, or others holding this view) consider to be "good"
examples of the use of inheritance for this purpose; to be contrasted
with Rosen's examples, which are criticized as unrepresentative of
good OO practices?

>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.

I'm sure I'm not telling anyone reading this anything they don't
already know, but there's more to the interface than the parameter
profile.  If you want to reason about how a client program is going to
behave when you call some operation, you'd better have some
implementation-independent specification of the abstract behavior of
that operation.  Put another way, correct software involves a lot more
than type-safety.  ALL the different implementations that might
actually be invoked by a call must have the same abstract behavior, or
you're going to have a hell of a time writing correct software (or at
least convincing yourself that it is correct).

What abstract explanation of this behavior are you going to use, then?
We could argue that this is not a language issue (at least not for an
implementation language like Ada), but someone has to think about this
problem before we can conclude which uses of inheritance are "good"
and which are "bad" from a software engineering perspective.


Cheers,
    -Bruce

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

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1992-11-13 20:37 Bruce Weide [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-11  4:20 sun-barr!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!darwin.sura.net!
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