www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7865] New: More realistic docs regarding virtual functions

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 puremagic.com
        ReportedBy: bearophile_hugs eml.cc



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: -------
Apr 08 2012