The nail in the coffin of C++ or why don't GO there...

Ervin Bosenbacher via Digitalmars-d digitalmars-d at puremagic.com
Thu Mar 30 04:15:10 PDT 2017


On Thursday, 30 March 2017 at 10:28:01 UTC, dennis luehring wrote:
> Am 30.03.2017 um 08:58 schrieb Ervin Bosenbacher:
>> That is the same, that came as a shock to me.
>
> most compilers (for many languages) can optimize your 
> super-trivial example down to nothing - for at least the last 
> 10 years or more
>
> so whats the point? you're talkin about "performance is 
> critical for me"
> but missing even minor knowledge about todays compiler powers?
>
> for a benchmark you need:
> -loops, running millions of times, preventing IO and do now 
> fall into the completely-optimized-to-nothing-trap etc.

I understand what you are saying, it wasn't a thorough all 
encompassing analysis just wanted a quick POC and convince myself 
whether D lang is sufficient enough for my case. I have already 
accepted the fact that if I want to optimize my Python code in 
certain situations, not all because you can use better algos, 
data structures, etc then I have to drop down to C++ or C using 
say pybind11. Instead of that D. And then if I am not happy with 
something I can drop to C or C++ anyway because its ABI 
compatible with C and with limitations with C++, right? After I 
have accepted the fact that I have to use various tools to solve 
various problems its not much of an issue. But with D i have to 
less code which is always better. Less code, less complexity, 
less bugs... etc I am not going to go down this vortex. :)

Yes I have much less knowledge of compilers probably than you do 
but I am happy with these results.

On another note my first choice was rust, and I have tried and 
tried, rejecting it multiple times. I am happy with D.



More information about the Digitalmars-d mailing list