private method in interface
Michael Shulman
viritrilbia at gmail.com
Fri Jun 3 11:59:33 PDT 2011
On Fri, Jun 3, 2011 at 11:22 AM, Jonathan M Davis <jmdavisProg at gmx.com> wrote:
>> However, given that in D, 'private' only means restricted to a
>> *module*, it's less clear to me why private functions should be
>> singled out as non-virtual. I might want certain methods to be
>> accessible only within a given module, but still allow them to be
>> overridden within a class hierarchy that exists entirely inside that
>> module. Unless the point of view is that each class should always
>> exist in its own module?
>
> No, there would be nothing wrong with overriding private member functions
> within a module with derived classes (assuming that private were overridable).
Okay. Then I don't quite understand the rationale for all private
functions being non-virtual.
Mike
More information about the Digitalmars-d-learn
mailing list