Linker errors with Interfaces

Michel Fortin michel.fortin at michelf.com
Wed Aug 11 05:49:27 PDT 2010


On 2010-08-11 08:33:00 -0400, Andrej Mitrovic 
<andrej.mitrovich at gmail.com> said:

> Private does not prevent overriding, final prevents overriding. Private
> prevents the methods from being explicitly called from either user code or
> any derived classes.

The D spec says private member functions are not virtual. Not that I 
agree with it, but it's like this.

"All non-static non-private non-template member functions are virtual."
<http://www.digitalmars.com/d/2.0/function.html>

The worst part of it is that changing a function from private to 
public, or the reverse, is a breaking ABI change because it affects the 
vtable.

-- 
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/



More information about the Digitalmars-d mailing list