home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!pmafire!news.dell.com!swrinde!elroy.jpl.nasa.gov!usc!sol.ctr.columbia.edu!ira.uka.de!slsvaat!us-es.sel.de!brendan
- From: brendan@us-es.sel.de (Dalton)
- Newsgroups: comp.lang.c++
- Subject: Virtual methods
- Message-ID: <1992Sep14.145950.7661@us-es.sel.de>
- Date: 14 Sep 92 14:59:50 GMT
- References: <#7vnafk.feustel@netcom.com>
- Sender: news@us-es.sel.de
- Organization: SEL-Alcatel LTS Dept. US/ES
- Lines: 15
-
- feustel@netcom.com (David Feustel) writes:
-
- |> Coplien's book "Advanced C++" makes the point that very little overhead
- |> would be incurred in most programe even if all functions were declared
- |> virtual and that some programs might even run faster than equivalent C
- |> programs using switch constructs to achieve the same effects.
-
- This reminds me of a question which I've been meaning to ask for some
- time now. Ignoring performance issues, why would one not declare every
- method in a class virtual? What circumstances might preclude its use?
-
- --
- Brendan J. Dalton (brendan@us-es.sel.de)
- ----------------------------------------
- Ritheann an fear seo ar phoitin
-