Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!gem.mps.ohio-state.edu!samsung!uunet!garfield!stretch!jeff1 From: jeff1@garfield.mun.edu (Jeff Sparkes) Newsgroups: comp.lang.c++ Subject: Re: Class scope and virtual functions Message-ID: Date: 9 Nov 89 05:37:34 GMT References: <21847@gryphon.COM> <10935@csli.Stanford.EDU> <1989Nov7.073836.23166@brutus.cs.uiuc.edu <20130@brunix.UUCP> Sender: news@stretch.MUN.EDU Distribution: na Organization: Memorial University of Newfoundland Lines: 31 In-reply-to: kdu@iris.brown.edu's message of 8 Nov 89 16:07:57 GMT >>>>> On 8 Nov 89 16:07:57 GMT, kdu@iris.brown.edu (Kenneth Utting) said: kdu> In article <1989Nov7.073836.23166@brutus.cs.uiuc.edu> kdu> sane@brutus.cs.uiuc.edu (Aamod Sane) writes: sane> What I mean is a parent->method() somewhat like this->method() but sane> refering to the class from where to start lookup. kdu> Apple's MPW C++ for the Macintosh supports an "inherited" kdu> keyword. So, rather than writing "between::func()" you write kdu> "inherited::func()" I don't know how this behaves with multiple kdu> inheritance. kdu> Regardless of the merits of using special keywords versus kdu> specifying the inherited class explicitly, what I find truly kdu> astonishing is that neither of the two C++ books I have kdu> (Stroustrup and Dewhurst & Stark) even mention this topic (how kdu> one method can call its inherited version). It is as though the kdu> creators and developers of this language do not think this is kdu> something anyone would want to do (my belief, on the other hand, kdu> is that this is one of the most fundamental operations in kdu> object-oriented programming). I've sometimes found it necessary to add some code in a derived class to handle special cases, and then having to copy the code from the original to handle the normal case. I'd love to be able to just handle the special case, or just call parent->method() to deal with the normal. -- Jeff Sparkes jeff1@garfield.mun.edu || uunet!garfield!jeff1 Humans couldn't have invented golf without alien intervention--Kids in the Hall