Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!bloom-beacon!gatech!hubcap!ncrcae!ncr-sd!hp-sdd!hplabs!hplabsz!kempf From: kempf@hplabsz.HPL.HP.COM (Jim Kempf) Newsgroups: comp.lang.c++ Subject: Paramaterized Types and Inheritance (was: C++ libraries) Message-ID: <817@hplabsz.HPL.HP.COM> Date: Tue, 29-Sep-87 11:13:50 EDT Article-I.D.: hplabsz.817 Posted: Tue Sep 29 11:13:50 1987 Date-Received: Thu, 1-Oct-87 04:02:55 EDT References: <1096@g.gp.cs.cmu.edu> Organization: Hewlett-Packard Laboratories Lines: 33 Summary: Be careful! In article <1096@g.gp.cs.cmu.edu>, dld@g.gp.cs.cmu.edu (David Detlefs) writes: > > How do inheritance and parameterized classes interact? I think that I would be very careful indeed about introducing both multiple inheritance and parameterized types into a language without careful thought about how the two interact. C++ is already a fairly rich language, and addition of other constructs may push it over the brink. Those who complain about excessive featurism in Ada and see C++ as relief should be concerned. I am even a little uneasy about introducting multiple inheritance into a language like C++ which depends on traditional linker/library technology for software reuse. The semantics of multiple inheritance are difficult even in a language like Common Lisp, where a more flexible linking discipline gives the language developer more control, and a richer runtime environment allows more information about libraries to be made available. The issue is not just one of implementation, but also whether the semantics match well with the programmer's model of how to do things, and whether the programming environment can support the additional load. I realize that competition from Eiffel (which has parameterized types and multiple inheritance) is tight, but Eiffel provides somewhat more in the way of software tools for dealing with the extra complexity, and, thought I've never used Eiffel, I'm not convinced that these tools would make much of a difference anyway, since the runtime environment in Eiffel is also fairly impoverished with respect to languages like Smalltalk and Lisp. Somebody ought to look into a formal semantics, whether algebraic, denotational, or abstract is irrelevent, of C++. With that in hand, the effect of an addition like parameterized classes can be better assessed. Jim Kempf kempf@hplabs.hp.com