Topic: Anonymous `super' class in C++
Author: dag@control.lth.se (Dag Bruck)
Date: 29 Nov 90 06:52:32 GMT Raw View
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