Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!agate!shelby!neon!pescadero.Stanford.EDU!philip From: philip@pescadero.Stanford.EDU (Philip Machanick) Newsgroups: comp.sys.mac.programmer Subject: Re: C++ vs Think C 4.0 Question Message-ID: <1990Nov30.000007.7057@Neon.Stanford.EDU> Date: 30 Nov 90 00:00:07 GMT References: <1990Nov27.040144.27236@cunixf.cc.columbia.edu> <1990Nov27.163703.1323@actrix.gen.nz> <1990Nov29.181707.25001@nntp-server.caltech.edu> Sender: news@Neon.Stanford.EDU (USENET News System) Reply-To: philip@pescadero.stanford.edu Organization: Computer Science Department, Stanford University Lines: 30 In article <1990Nov29.181707.25001@nntp-server.caltech.edu>, woody@nntp-server.caltech.edu (William Edward Woody) writes: |> In article <1990Nov27.163703.1323@actrix.gen.nz> Bruce.Hoult@bbs.actrix.gen.nz writes: |> >In article <1990Nov27.040144.27236@cunixf.cc.columbia.edu> jtt@cunixd.cc.columbia.edu (James T. Tanis) writes: |> >> I'm interested in learning c++, but in reading various stuff about it, I |> >> have |> >> yet to encounter the "inherited" scope specifier, ubiquitous in TCL |> >> programs. Is there, in fact, no way in 'real' c++ to just call the same |> >> function in a base class? |> >Correct. Standard C++ doesn't have the "inherited" keyword. Apple have added |> >it to their MPW C++ compiler, but only for objects derived from the special |> >base class "PascalObject". They didn't allow it in general useage because |> >they wanted to "avoid making gratuitous changes to C++". |> > |> >I'd like to see it as well. |> Actually, if you have the following declarations: [example] |> The problem with this keyword is when you have multiple inheritance. For |> example: [example] |> C++ requires that you expressly indicate which function you are calling. |> This is only a minor price to pay, IMHO, for the value of multiple |> inheritance. There is a discussion of this going on in comp.lang.c++. Multiple inheritance makes it impossible to implement "inherited" in cases where there might be ambiguity as to the intended base class. However, this ambiguity issue comes up in other contexts in C++ as well. It doesn't mean the feature couldn't be implemented, only that it couldn't always be used. -- Philip Machanick philip@pescadero.stanford.edu