[Issue 7865] New: More realistic docs regarding virtual functions
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Apr 8 17:16:25 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7865
Summary: More realistic docs regarding virtual functions
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: websites
AssignedTo: nobody at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2012-04-08 17:17:07 PDT ---
This is a part of the virtual function docs:
http://dlang.org/function.html#virtual-functions
"All non-static non-private non-template member functions are virtual. This may
sound inefficient, but since the D compiler knows all of the class hierarchy
when generating code, all functions that are not overridden can be optimized to
be non-virtual."
Marco Leise suggests a text that is more similar to this one:
"If you deal with non exported classes and don't use incremental compilation as
well as refrain from compiling your code into static libraries, a D compiler
can optimize methods to be non-virtual. As of the time of writing [...] no such
compiler exists."
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list