Slow performance compared to C++, ideas?

Jonathan M Davis jmdavisProg at gmx.com
Tue Jun 11 20:34:53 PDT 2013


On Wednesday, June 12, 2013 13:26:44 Daniel Murphy wrote:
> "Jonathan M Davis" <jmdavisProg at gmx.com> wrote in message
> news:mailman.894.1370540538.13711.digitalmars-d at puremagic.com...
> 
> > On Wednesday, June 05, 2013 22:50:14 Michel Fortin wrote:
> >> P.S.: while implementing this change, please make sure private and
> >> package functions can be virtual.
> > 
> > I'd agree with package on that, but I don't think that private should be
> > virtualizable, because that conflicts with actually hiding non-accessible
> > functions, which is what a number of us are pushing for. Otherwise,
> > private
> > implementation details of classes and modules risk causing code breakage
> > (e.g.
> > the fact that overload resolution occurs before checking the access level
> > is
> > atrocious).
> > 
> > - Jonathan M Davis
> 
> Private functions can be overridden only within the same module. This does
> not conflict with hiding private members from _outside_ the module. You
> will always be able to _see_ private members from inside the same module,
> virtual or not.

Good point, but I fully expect that many of the folks who want to do NVI will 
want to use private functions for that as they do in C++, and I think that 
that would be a mistake. private is accessible within a module, so it should 
be visible to everything in that module, but IMHO, it shouldn't be visible or 
overridable outside of the module, as nothing outside of the module would have 
access to it, and it would be too detrimental with regards to name clashes to 
permit it.

- Jonathan M Davis


More information about the Digitalmars-d mailing list