Slow performance compared to C++, ideas?
Adam D. Ruppe
destructionator at gmail.com
Wed Jun 5 15:32:58 PDT 2013
On Wednesday, 5 June 2013 at 22:03:05 UTC, Walter Bright wrote:
> 1. Introduce 'virtual' storage class. 'virtual' not only means
> a method is virtual, but it is an *introducing* virtual, i.e.
> it starts a new vtbl[] entry even if there's a virtual of the
> same name in the base classes. This means that functions marked
> 'virtual' do not override functions marked 'virtual'.
Your upgrade path sounds generally good to me, I can live with
that.
But I want to clearify this #1:
class A { virtual void foo(); }
class B : A { virtual void foo(); }
Error, yes? It should be "override void foo();" or "override
final void foo();".
(override and virtual together would always be an error, correct?)
Whereas:
class A { virtual void foo(); }
class B : A { virtual void foo(int); }
is OK because foo(int) is a new overload, right?
If I have these right, then yeah, I think your plan is good and
should happen.
More information about the Digitalmars-d
mailing list