Abstract functions in child classes

Regan Heath regan at netmail.co.nz
Fri Dec 2 09:56:12 PST 2011


On Fri, 02 Dec 2011 17:44:44 -0000, Adam <Adam at anizi.com> wrote:

> Or I provide it as source, in which case, D *can* check it.
> But it means that when the parent is changed, my class type and
> instantiability implicitly changes, too.

True.  This is a case I hadn't considered before.  In this case the user  
will get an error instantiating your class and report a bug to you.  Not  
ideal, but assuming you document the versions of the parent library you're  
compatible with, and run your unit tests against these it shouldn't happen  
and when it does it will be because the user upgraded the parent library  
past your compatibility guarantee, so it's on them.

R

-- 
Using Opera's revolutionary email client: http://www.opera.com/mail/


More information about the Digitalmars-d-learn mailing list