home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / cplus / 13633 < prev    next >
Encoding:
Text File  |  1992-09-14  |  1.5 KB  |  43 lines

  1. Organization: Junior, Math/Computer Science, Carnegie Mellon, Pittsburgh, PA
  2. Path: sparky!uunet!europa.asd.contel.com!darwin.sura.net!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!news.sei.cmu.edu!fs7.ece.cmu.edu!crabapple.srv.cs.cmu.edu!andrew.cmu.edu!sm86+
  3. Newsgroups: comp.lang.c++
  4. Message-ID: <UehC5QK00VpdEXFmlo@andrew.cmu.edu>
  5. Date: Mon, 14 Sep 1992 15:00:44 -0400 
  6. From: Stefan Monnier <sm86+@andrew.cmu.edu>
  7. Subject: Re: Virtual methods
  8. In-Reply-To: <1992Sep14.145950.7661@us-es.sel.de>
  9. References: <#7vnafk.feustel@netcom.com>
  10.     <1992Sep14.145950.7661@us-es.sel.de>
  11. Lines: 30
  12.  
  13. Excerpts from netnews.comp.lang.c++: 14-Sep-92 Virtual methods
  14. Dalton@us-es.sel.de (664)
  15. > This reminds me of a question which I've been meaning to ask for some
  16. > time now. Ignoring performance issues, why would one not declare every
  17. > method in a class virtual? What circumstances might preclude its use?
  18.  
  19. > -- 
  20. > Brendan J. Dalton (brendan@us-es.sel.de)
  21. > ----------------------------------------
  22. > Ritheann an fear seo ar phoitin
  23.  
  24.  
  25. You've got it: performance issue !
  26. (well, there could be some other issues: arrange so that future
  27. subclasses can't change that method (protection). But is it
  28. really useful ?)
  29. BTW: Gcc has a commandline option which declares all methods 
  30. as virtual !  OOP is just so much less powerful without virtuality !
  31.  
  32.  
  33.     Stefan Monnier
  34.  
  35. -----------------------------------------------------
  36. -- On the average, people seem to be acting normal --
  37. -----------------------------------------------------
  38.  
  39.  
  40.  
  41.  
  42.  
  43.