home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!microsoft!hexnut!jimad
- From: jimad@microsoft.com (Jim Adcock)
- Subject: Re: static members in derived classes
- Message-ID: <1992Dec14.215407.21631@microsoft.com>
- Date: 14 Dec 92 21:54:07 GMT
- Organization: Microsoft Corporation
- References: <Bz20Gt.29x@cs.uiuc.edu> <1992Dec11.145205.29761@wam.umd.edu> <1992Dec12.175244.17775@taumet.com>
- Lines: 19
-
- In article <1992Dec12.175244.17775@taumet.com> steve@taumet.com (Steve Clamage) writes:
- |"Virtual static" has been proposed from time to time. I don't know of
- |any technical objections to it. There are lots of good ideas for
- |extensions to C++. The question is always one of evaluating the costs
- |and benefits of any proposed extension.
-
- The technical argument against it is that the same capability can be
- implementing using virtual functions. If the complaint is that virtual
- functions are too slow to implement "virtual statics" then the counter-
- reply is that compilers can use a fat table implementation [or other
- implementation] instead of the common vtable implementation in order
- to reduce the cost of the virtual function call in these cases.
-
- Going the opposite direction people who propose "virtual static" do so
- on the basis of an assumed vtable implementation of virtual functions.
- In which case including "virtual static" begins to dictate one implementation
- over other potentially faster implementations, which is not a good thing
- to do. Language should specify language, not dictate implementation.
-
-