Slow performance compared to C++, ideas?

Rob T alanb at ucora.com
Thu Jun 6 10:10:35 PDT 2013


On Thursday, 6 June 2013 at 15:40:26 UTC, Joseph Rushton Wakeling 
wrote:

> I see a potential problem with allowing 'final' on its own to 
> mean 'final and
> non-overriding', which is that if you _mean_ to override a 
> function in the base
> class, but put simply 'final' and not 'override', it will still 
> be accepted by
> the compiler -- and it may not be obvious that the override is 
> not taking place.
>
> So, I think 'new' could have a place here after all.

My understanding is that final on it's own would be an error if 
the same named function was virtual in the base class, otherwise 
you would have to specify "final override". If that understanding 
is not correct, then I agree that would be a source of hidden 
errors.

--rt


More information about the Digitalmars-d mailing list