Module-level accessibility

Jonathan M Davis jmdavisProg at gmx.com
Mon Oct 4 11:13:52 PDT 2010


On Monday, October 04, 2010 10:37:53 Sean Kelly wrote:
> Andrei Alexandrescu Wrote:
> > There is still debate on the matter of private methods in interfaces.
> > Please bring up in this forum any additional pro and con arguments that
> > you might have.
> 
> What debate?  Private methods don't get a vtbl entry so I don't see how an
> interface could possibly require one, regardless of in-module visibility.

Except that per TDPL private methods are _supposed_ to be in the vtable: 
http://d.puremagic.com/issues/show_bug.cgi?id=4542

The fact that they don't currently is definitely limiting. Personally, I liked 
what TDPL said about interfaces and private methods, and I don't know what the 
debate against them is. It all seemed quite sensible to me.

Regardless, however, private methods really should be properly polymorphic.

- Jonathan M Davis


More information about the Digitalmars-d mailing list