www.digitalmars.com         C & C++   DMDScript  

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


           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

--- Comment #0 from bearophile_hugs eml.cc 2012-04-08 17:17:07 PDT ---
This is a part of the virtual function docs:

"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