private (aka no-inherit) implementations for public methods

BCS none at anon.com
Fri Dec 4 10:16:30 PST 2009


Hello Bill,

> Trouble is you have no idea exactly what behavior other classes are
> going to extend.
> It may not require reimplementing serialize, for instance.  Like
> subclassing to implement ref-counting or something.  I don't think you
> can determine up front which methods need to be overridden and which
> do not.  It depends entirely upon how the subclass is going to extend
> the base class.
> --bb
> 

Because you can't determine up front which methods needn't be overridden 
and which must to be there should be a way to force this issues to be addressed 
by the author of the derived class.. For some cases, you can make an educated 
guess that in general some cases will need to be overridden (unless the user 
says otherwise).

vote++





More information about the Digitalmars-d mailing list