From: elroy.jpl.nasa.gov!swrinde!cs.utexas.edu!asuvax!ennews!enuxha.eas.asu.edu !koehnema@ames.arc.nasa.gov (Harry Koehnemann)
Subject: OO in Ada (wasRe: Invoking Inherited Routines in Ada9x)
Date: 12 Dec 91 15:34:11 GMT [thread overview]
Message-ID: <1991Dec12.153411.4361@ennews.eas.asu.edu> (raw)
In article <1991Dec11.155758.6327@software.org> blakemor@software.org (Alex Bla
kemore) writes:
>
>Ada's solution seems similar to C++'s in that the subclass must
>name the superclass to invoke the parent method (using OO speak)
>I assume you find that brittle because it makes it difficult
>to rearrange the inheritance hierarchy ? perhaps to add a new
>intermediate level.
Further, it makes the user of a method be responsible for implementation
knowledge. This sits a little funny with me in terms of encapsulation.
I want an ADT to provide me operations. I shouldn't by my responsibilty
to know (in fact, I shouldn't be allowed to know) that a certain operation
is actually being provided by a particular parent 'class' (or package).
Furthermore, this mechanism also allows any other 'class' to declare
operations on a type that they are not even providing. It's a more powerful
mechanism, but seems to sit a little funny with traditional OO concepts.
We lose that 'textual closeness' we have with a class construct.
This may be the wrong group to ask this question, but does anyone know
of papers/talks/... that contrast languages that use type extensions
to support inheritance with those that use a class construct? It seems
feasible to take a few OO problems and implement them with classes and
type extensions and see which one works cleaner and for which types of
problems. Has anyone done this? (now, if only I hadn't already picked
out a thesis topic...)
--
Harry Koehnemann
koehnema@enuxha.eas.asu.edu
reply other threads:[~1991-12-12 15:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox