Benchmark of D against other languages

Manu via Digitalmars-d digitalmars-d at puremagic.com
Mon Apr 6 06:46:52 PDT 2015


On 3 April 2015 at 05:00, deadalnix via Digitalmars-d
<digitalmars-d at puremagic.com> wrote:
> On Thursday, 2 April 2015 at 09:06:52 UTC, Manu wrote:
>>
>> virtual by default is completely wrong for D.
>>
>> And don't say 'speculative' devirtualisation. What an abomination!
>> Just fix the problem; don't have every function be virtual in the
>> first place!
>
>
> I'm not sure why you don't use struct in the first place ?

It's not a reference type.
Class is the natural reference type, and people naturally want to use
it. I have no control over that.
I have said before, most of my anecdotes are simply what has happened
in my presence, despite my coaching otherwise.
Also, it's useful to have a virtual or 2... and I mean that, _1 or 2_,
among 10's of other properties and methods.
As I've said before, my experience has demonstrated to me precisely
what I predicted; that even when coached to write final everywhere,
nobody EVER did that in my presence... not once. Never.
It's completely unnatural for programmers to do this, and therefore
the default is wrong.

I don't make this argument based on what I do/don't do, so your
assertion about what I should/shouldn't do is irrelevant, I've said
this many times before.
I make this argument in relation to _what I have to clean up_, and D
has made my life significantly harder in this regard than C++, which
was already a nightmare.
Not only is it harder and more time-wasting to discover mis-virtuals,
but in the case you're dealing with libs, it's also a breaking change
to fix it, and that's a very serious problem.

Anyway, we're done with this.


More information about the Digitalmars-d mailing list