Bug 7865 – More realistic docs regarding virtual functions

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dlang.org
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-04-08T17:17:07Z
Last change time
2019-12-18T16:30:30Z
Keywords
trivial
Assigned to
No Owner
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2012-04-08T17:17:07Z
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."
Comment #1 by bugzilla — 2019-12-18T16:30:30Z
The size has changed a lot since the report was issued. IMHO this report isn't anymore of any help...