Re: c++ inheritance

bejenari@latcs1.lat.oz.au (Teodor I Bejenariu)
Fri, 12 Nov 1993 05:19:00 GMT

          From comp.compilers

Related articles
Re: c++ inheritance bejenari@latcs1.lat.oz.au (1993-11-12)
Re: c++ inheritance ltd@netcom.com (1993-11-13)
| List of all articles for this month |
Newsgroups: comp.compilers
From: bejenari@latcs1.lat.oz.au (Teodor I Bejenariu)
Keywords: C++, OOP, question
Organization: Comp Sci, La Trobe Uni, Australia
Date: Fri, 12 Nov 1993 05:19:00 GMT

              Recently I've started looking into how inheritance works in OO
languages (C++ in particular). Given the following inheritance structure:


                W(a,b,c,d)
                |
                X
                |
                Y
                |
                Z(a,b,c,d)


where W is a class with properties (a,b,c,d), and where class Z makes use
of (a,b,c,d), which are acquired by inheritance through classes Y and X.
            Assume that class W has other properties to pass down to X, Y and Z,
so the class structure above is shown to help explain the problem better.


Q1 : If classes X and Y don't need/want properties (a,b,c,d) do they have
to inherit them ?


Q2 : Will any changes to (a,b,c,d) lead to the intermediate classes(X, Y)
being recompiled ?


Q3 : Would it be reasonable to expect that classes X and Y should not be
recompiled because they don't need to ?


Q4 : Is it a big issue that the intermediate classes get recompiled in
large projects, when the compilation time may be an important issue ?


Q5 : How do I find out more about how particular compilers handle the
storage mechanism and typing model used in implementing inheritance, and
also is there any literature that deals with the situation in Q3 and Q4 ?


Teodor.
[Last time I checked, the answers to Q2, Q3, and Q4 were all yes.
For Q1 it's debatable. -John]






--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.