home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / cplus / 17956 < prev    next >
Encoding:
Text File  |  1992-12-14  |  1.5 KB  |  30 lines

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