If you had money to place for a bounty, what would you choose?

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Mon Dec 2 14:43:44 PST 2013


On 12/2/13 4:19 AM, Manu wrote:
> The problem is that virtual is irrevocable. It can't be removed without
> breaking the API

Here we go again. No, that's not the problem. A similar issue goes about 
final.

>, which means it's not possible to optimise a library in
> that way at any time after it has already been released to the wild. The
> converse is not true.

Conversely final makes it impossible tweak behavior after the library 
has been released in the wild. You could reasonably argue that you care 
more about performance optimization than tweaking behavior.

> It has also been agreed that there is very little the compiler/optimiser
> can do to help.

Same goes about "virtualizing" final.

> It's a dangerous default,

How is it "dangerous"?

> it's got absolutely nothing to do with "I
> don't want to type final" as you helpfully simplified it. You can type
> 'virtual:' at the top, and you're set.

Can't _you_ type 'final:' at the top and be set? Why is it that, to 
paraphrase a recent crazy twitter flamewar (http://goo.gl/h9NMxK), your 
Thanksgiving is more important than everybody else's?

> Again, the converse doesn't
> stand, you can't practically type 'final:' at the top since there will
> inevitable by SOME virtual methods.

Group them before the final: or go through the trouble of typing final { 
... }.

> We can spin off another thread if you like, or you can read through the
> old ones. I don't think it's going to go any further than the other
> threads already did.

We'll see. If I learned anything from the past, is this has just restarted.


Andrei



More information about the Digitalmars-d mailing list