On 2012-03-18 04:27, bearophile wrote:
F i L:
I'm a bit confused. Reading through the virtual function's docs
(http://dlang.org/function.html#virtual-functions) it says:
"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."
This is so much theoretical that I think this should be removed from the D
docs. And to be put back when one DMD compiler is able to do this. Otherwise
it's just false advertising :-)
I agree that can be misleading. But I think the D docs should be about
the D language and not DMD implementation of D.
--
/Jacob Carlborg