Slow performance compared to C++, ideas?

Jonathan M Davis jmdavisProg at gmx.com
Wed Jun 5 22:52:10 PDT 2013


On Wednesday, June 05, 2013 22:17:49 H. S. Teoh wrote:
> On Wed, Jun 05, 2013 at 09:14:08PM -0400, Jonathan M Davis wrote:
> > On Wednesday, June 05, 2013 17:49:17 Walter Bright wrote:
> > > I think we accomplish this in a simpler way:
> > > 
> > > 1. 'virtual' means a method is an "introducing" one.
> > > 2. 'override' means a method overrides a base virtual function with a
> > > final
> > > function.
> > > 3. 'override virtual' means override with a non-final function.
> > > 4. none means final and non-overriding.
> > 
> > I would have expected something more like
> > 
> > 1. 'virtual' means a method is an "introducing" one.
> > 2. 'override' means override with a non-final function.
> > 3. 'final override' means a method overrides a base virtual function with
> > a
> > final function.
> > 4. 'final' by itself both mean final and non-overriding.

> As for no specification, I thought the whole point was to have it
> default to final? So 'final' should be optional in this case.

Yes. It appears that I typed #4 too quickly, so maybe that's what's confusing 
you. It should say

4. 'final' by itself and none both mean final and non-overriding.

So, the _only_ things that would change would be

1. virtual would now be required on the "introducing" function to make it 
virtual.

2. Functions without virtual or override would now be implicitly final and non-
virtual.

- Jonathan M Davis


More information about the Digitalmars-d mailing list