Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!decwrl!sgi!shinobu!odin!yellowsub!lord From: lord@yellowsub.sgi.com (Tom Lord) Newsgroups: comp.lang.c++ Subject: Re: renaming Message-ID: <8238@odin.corp.sgi.com> Date: 29 May 90 22:36:56 GMT References: <18591@orstcs.CS.ORST.EDU> Sender: news@odin.corp.sgi.com Organization: Silicon Graphics, Inc., Mountain View, CA Lines: 26 In article <18591@orstcs.CS.ORST.EDU> budd@mist.CS.ORST.EDU (Tim Budd) writes: >When using inheritance, particularly multiple inheritance, it seems I often >miss the ability to do renaming, as in Eiffel. > >[...] As it stands, now I have to do something like the following > >class foo : public bar, pubic baz { > ... > void gak(int i) { bar::geek(i); } > .. >} > >which is arguably no less readable, but does introduce the run-time >overhead of one additional function invocation. This should have no extra overhead at all. That is the point of inline functions. Whatever system your language has for resolving `name clashes' in cases like this is definately going to be wrong. Providing rename operators to sprinkle throughout declarations is quirky at best. Writing code to resolve the abiguities is the most general, and simplest solution. Having your compiler do inline optimizations for this code is a pretty good impementation strategy. -t