home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- From: nikki@trmphrst.demon.co.uk (Nikki Locke)
- Path: sparky!uunet!pipex!demon!trmphrst.demon.co.uk!nikki
- Distribution: world
- Subject: inherited:: proposal (Was: Renew?)
- References: <1992Jul28.184049.24609@ucc.su.OZ.AU>
- X-Mailer: cppnews $Revision: 1.10 $
- Organization: Trumphurst Ltd.
- Lines: 56
- Date: Fri, 31 Jul 1992 10:47:49 +0000
- Message-ID: <712604869snx@trmphrst.demon.co.uk>
- Sender: usenet@gate.demon.co.uk
-
-
- In article <1992Jul28.184049.24609@ucc.su.OZ.AU> maxtal@extro.ucc.su.OZ.AU (John MAX Skaller) writes:
- > Hope Bjarne doesnt mind me posting this.
- ..
- > From bs@research.att.com Tue May 19 04:13:57 1992
- ..
- > This paper proposes the extension of C++ with the keyword
- > inherited, a qualified-class-name used to denote an inher-
- > ited class member. The advantages are a clearer inheritance
- > relationship and increased programming safety. The imple-
- > mentation cost is small, and the consequences for existing
- > code minor.
- ..
- > We will
- > never know if this proposal would have passed, though,
- > because at this point in the discussion, Michael Tiemann
- > walked in and muttered something like ``but we don't need
- > that extension; we can write code like that already.'' When
- > the murmur of ``but of course we can't!'' had died down
- > Michael showed us how:
- > 9 class foreman : public employee {
- > typedef employee inherited;
- > // ...
- > void print();
- > };
- > 99 class manager : public foreman {
- > typedef foreman inherited;
- > // ...
- > void print();
- > };
- > 99 void manager::print()
- > {
- > inherited::print();
- > // ...
- > }
- > What we hadn't noticed was
- > that the re-introduction of nested classes into C++ had
- > opened the possibility of controlling the scope and resolu-
- > tion of type names exactly like other names.
- I found this example very illuminating (not surprising, considering its
- source :-). I might well start using "inherited" typedefs in my user
- interface toolkit (although I might call it "base" or "super" instead of
- "inherited" - comments anyone ?).
-
- I would be interested to learn about other proposals which have been
- rejected, particularly those for which the main reason for rejection was
- that existing language features made the proposal unnecessary. I feel I
- could broaden the scope of my C++ knowledge considerably this way.
-
- Is there anywhere where I could obtain access to such information ?
- ---
- Nikki Locke | | nikki@trmphrst.demon.co.uk
- Trumphurst Ltd. | Tel: +44 (0)691-670318 | nikki@cix.compulink.co.uk
- PC and Unix consultancy | Fax: +44 (0)691-670316 | nikki@kewill.co.uk
- trmphrst.demon.co.uk is NOT connected with ANY other sites at demon.co.uk.
- Demon.co.uk is a dial-up subscription access point to the Internet.
-