Why do C++ programmers are not interested in D?

Steven Schveighoffer schveiguy at gmail.com
Tue Nov 19 16:24:38 UTC 2019


On 11/19/19 3:51 AM, Pavel Shkadzko wrote:
> Sorry for "clickbaity" title but I believe it is discussion inducing.
> 
> This spring I started looking into D and trying it for some of the data 
> analysis and scripting tasks. So, I am fairly new to the language and 
> all its toolset (mainly using Python and Scala at work). I don't know 
> C++. We do however have C++ engineers so I asked them around. I was 
> quite surprised that none of them knew or even tried to use D. They of 
> course heard about the language but that's it.
> 
> This Friday I also attended a PyTorch meetup in Munich at Microsoft 
> where one of the core PyTorch developers (Adam Paszke) made a 
> presentation about the future of this deep learning library. During 
> presentation he mentioned that he played around with Hasktorch (a 
> PyTorch inspired library in Haskell) to see how does PyTorch concepts go 
> with functional style. When I approached him after the talk and asked if 
> he ever thought of trying D for that purpose he looked surprised and 
> confessed that he didn't know the language, heard about it yes but it 
> never occurred to him to try and use it.

I think it pretty much has to do with
1. what can I get my employer to accept as a language to use and
2. How easy is it to interface with my existing code base.

I think the complaints about the GC are way overblown, they are the 
"Never" crowd. E.g. the ones who will never choose D for whatever 
reason. If you fix that reason, they'll find another one. Yes, I know 
there are certain places where the GC is no good for that domain (e.g. 
AAA games), but there are much more important problems to solve for 
those domains (i.e. atomics and lock-free message passing), and we do 
give tools to prevent GC usage (@nogc and betterC).

But on my first point above, not many will accept D as a language to 
base their company on. The ones who do seem to have shined through with 
success stories (Sociomantic, Weka, Symmetry), but it's just less risky 
to use C++ in many minds.

On the second point, we need to get to a place where via tools (dpp) or 
compiler adjustments (extern C++) we can interface NATIVELY with 
existing C++ code. One of the most important revelations from Atila, who 
is obviously a VERY pro-D person, is when he still picked C++ for a 
project at the company he worked for despite having sole discretion over 
whether to use D or not. He did it because all the code was already C 
and to do it in C++ means "I just can include the headers I need". For 
D, he would have to port much of those headers to D by hand.

We are getting there. And honestly, I'm fine with D being it's own thing 
and not attracting huge swaths of C++ programmers. They'll figure it out 
eventually, and there is something to not chirping about how much better 
D is than C++ when sometimes the initial experience can be so negative 
on your expectations (stories I hear all the time from pro-D people who 
convinced coworkers to try out D).

I think we are best off not lamenting about the lack of C++ immigrants.

-Steve


More information about the Digitalmars-d mailing list