Thread View: comp.std.c++
1 messages
1 total messages
Started by Dag Bruck
Thu, 29 Nov 1990 06:52
Anonymous `super' class in C++
Author: Dag Bruck
Date: Thu, 29 Nov 1990 06:52
Date: Thu, 29 Nov 1990 06:52
33 lines
1593 bytes
1593 bytes
The idea of specifying an anonymous base class in C++ came up recently
on the net. Basically, you would be able to write:
struct B { virtual void foo(); };
struct D { void foo(); };
void D::foo()
{
inherited::foo(); // instead of `B::foo'
// do some more
}
I like the keyword `inherited' (which is used in Mac C++), but `super'
is used in e.g. SmallTalk.
I have written a proposal for X3J16, called "New keyword for C++:
inherited", document number X3J16/90-0086. It has a fairly long
section on reasons for introducing `inherited'. (A little teaser: one
of the advantages is that may introduce ambiguities in your program!)
People interested in my proposal can send me mail, and I will e-mail
them a copy (please indicate ASCII or PostScript). If the interest is
overwhelming, I will post it to this group.
Best regards,
Dag Br\"uck
--
Department of Automatic Control E-mail: dag@control.lth.se
Lund Institute of Technology
P. O. Box 118 Phone: +46 46-108779
S-221 00 Lund, SWEDEN Fax: +46 46-138118
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads