comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: Inheritance versus Generics
Date: 1997/04/29
Date: 1997-04-29T00:00:00+00:00	[thread overview]
Message-ID: <dewar.862315825@merv> (raw)
In-Reply-To: 862296320.11810@dejanews.com


Bertrand said

<<Just a small clarification: the discussion (appendix B in the
recent edition of my book, entitled "Genericity vs. Inheritance"
and the n-th iteration of an article originally in the first
OOPSLA conference in 1986) shows that inheritance
can simulate some aspects of genericity, but not all,
and that genericity by itself can
only cover a small part of inheritance. On the basis of this
analysis it concludes that one needs both mechanisms, and deduces
the precise combination that appears adequate to cover all
needs at minimal complexity.>>


It is always tempting to try to unify features in programming languages
which seem related, and it has always been tempting for designers to try
to avoid having both inheritance and genericity, but given the very clear
attempts that have been rethought (C++ adding templates, and Ada adding
generalized inheritance), it really seems like we cannot avoid having
both facilities. Bertrand's argument is certainly convincing, but in a
way it is even more convincing when advocates of the contrary viewpoint
come to change their mind.

My view is that at this stage, any language not providing effective
facilities in both departments is definitely decrepit (you may make
up your own list of languages that are thus declared decrepit, or
perhaps, with less flowery language, lacking :-) -- one interesting
entry on that list is OO-COBOL, which has remarkably powerful OO
features, including full inheritance, but completely lacks genericity
(well I suppose you can use COPY REPLACING for a very limited version
of text oriented macros to address some subset of the problem ...)

Robert Dewar






  reply	other threads:[~1997-04-29  0:00 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-04-24  0:00 Inheritance versus Generics Craig Smith
1997-04-25  0:00 ` Tucker Taft
1997-04-25  0:00 ` Robert A Duff
1997-04-25  0:00 ` Lionel Draghi
1997-04-25  0:00 ` Mats Weber
1997-04-27  0:00   ` Matthew Heaney
1997-04-27  0:00     ` Robert Dewar
1997-04-28  0:00       ` Bertrand Meyer
1997-05-03  0:00         ` Jon S Anthony
1997-05-04  0:00           ` Robert Dewar
1997-05-03  0:00         ` Robert A Duff
1997-05-03  0:00           ` Robert Dewar
1997-04-29  0:00     ` bertrand
1997-04-29  0:00       ` Robert Dewar [this message]
1997-04-25  0:00 ` Robert Dewar
1997-04-25  0:00   ` Michael F Brenner
1997-04-25  0:00     ` Robert Dewar
1997-04-27  0:00       ` Nick Roberts
1997-04-29  0:00         ` Michael F Brenner
1997-05-02  0:00           ` Nick Roberts
1997-05-03  0:00             ` Robert Dewar
1997-05-02  0:00           ` John G. Volan
1997-04-29  0:00       ` Mats Weber
1997-05-01  0:00         ` Robert Dewar
1997-04-26  0:00   ` Michael Feldman
1997-04-28  0:00 ` Martin Lorentzon
  -- strict thread matches above, loose matches on Subject: below --
1997-04-27  0:00 tmoran
1997-05-03  0:00 tmoran
replies disabled

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