Slow performance compared to C++, ideas?
Michal Minich
michal.minich at gmail.com
Fri May 31 03:25:13 PDT 2013
On Friday, 31 May 2013 at 04:06:58 UTC, deadalnix wrote:
> I don't think going as far as making thing final by default
> make sense at this point. But we sure need a way to be able to
> finalize methods. We had an extensive discussion with Don and
> Manu at DConf, here are some idea that came out :
>
> - Final by default
[..]
> - Introduce a virtual keyword.
[..]
C# has final by default, and mandatory virtual keyword.
Barely anyone complained. Mostly is considered a good thing to be
explicit. As for the D, since the override keyword is mandatory,
it would be a compiler error to omit a virtual keyword on base
method, and thus easily fixable.
As for the methods that are supposed to be virtual but never
actual overridden - there you must know which ones that should
be, and make that explicit. This applies only for libraries, and
only the ones that use lot of methods intend to be overridden
(generally questionable design) have some work to do on being
explicit about virtual.
More information about the Digitalmars-d
mailing list