Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!wuarchive!usc!apple!snorkelwacker!bloom-beacon!eru!luth!sunic!dkuug!iesd!iesd.auc.dk!amanda From: amanda@iesd.auc.dk (Per Abrahamsen) Newsgroups: comp.lang.c++ Subject: Re: Efficient compilation of virtual functions Message-ID: Date: 25 Aug 90 19:00:23 GMT References: <1990Aug22.193347.18486@ux1.cso.uiuc.edu> <6428@wolfen.cc.uow.oz> <417@taumet.com> Sender: news@iesd.auc.dk (UseNet News) Organization: Games Research, University of Aalborg, Denmark Lines: 33 In-reply-to: steve@taumet.com's message of 24 Aug 90 15:59:02 GMT >>>>> On 24 Aug 90 15:59:02 GMT, steve@taumet.com (Stephen Clamage) said: Per> It would be nice to be able to declare a class or even a member Per> function as "leaf". Even if we disregard the possible optimizations, Per> it would add to the programmers ability to document the classes. Stephen> I don't think I agree with this. If you declared a leaf node, you Stephen> would be prohibiting further reuse of the class by deriving from it. I think the class designer should be able to specify which classes can be reused by deriving from them, in the same way as the class designer can specify which member functions can be used by an derived class (protected and public) and which can not (private). Stephen> How do you know that another object with slightly more specialized Stephen> behavior will never be needed in the future? In my programs, such a situation would indicate the need for a new abstract class, which provided the functionality shared by both classes. Stephen> Someone needing this capability while also using your code would be Stephen> required to duplicate the existing code with new names, then create Stephen> conversion functions to your old class hierarchy. Unless he is allowed to introduce a new abstract class. Stephen> This seems like a steep price to pay for some special-case Stephen> micro-optimization. The only price to pay for people who do not like that way of programming, would be yet another feature of the language to ignore, in a language which are already to full of such features.