Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!seismo!mcvax!ukc!eagle!icdoc!dcw From: dcw@icdoc.UUCP Newsgroups: comp.lang.c++ Subject: Re: Questions About C++ Message-ID: <455@ivax.doc.ic.ac.uk> Date: Fri, 12-Jun-87 11:23:12 EDT Article-I.D.: ivax.455 Posted: Fri Jun 12 11:23:12 1987 Date-Received: Thu, 18-Jun-87 00:59:58 EDT Sender: dcw@doc.ic.ac.uk Reply-To: dcw@doc.ic.ac.uk (Duncan C White) Distribution: comp Organization: Dept. of Computing, Imperial College, London, UK. Lines: 45 Thanks for the many messages we received about our questions about C++ versus SIMULA. This article, and the following two, are a summary of what we have learned. I'm afraid the third part [ in, super, qua and conclusion ] is again very large... NB: There may be some overlap with Mike Mowbray's response <125@otc.OZ> - I did ask people not to respond via news... ---------------------------------------------------------------------------- Part1/3 Derived and base class defns We asked whether 'derived class' ---------------------------- corresponded to 'ancestor' or only to 'immediate ancestor' : parent. Paul Calder explained : >"Derived class" and "base class" are like your "SUBCLASS" and "SUPERCLASS", >except that some rules apply only to "IMMEDIATE" relatives. For example - > > "A pointer to a class may be converted to a pointer to a public > base class (read "any of the SUPERCLASSES") of that class" > Section 6.7 > > "... the public members of the base class (read "IMMEDIATE SUPERCLASS") > are public for the derived class ..." > Section 8.5.9, para 2 > >In general, The Book seems to be fairly clear, using expressions like "a >base class" where any will do, and "the base class" where only the immediate >parent is meant. I find that the semantics are usually intuitive. This shows that there is a certain amount of ambiguity, but it seems to be a fair summary, so let us define : o a base class == superclass o THE base class == immediate superclass o a derived class == subclass o THE derived class == immediate subclass Andrew Koenig, AT&T Bell Labs and David Wonnacott, AT&T Corporate Education came to the same conclusion.