Limitations of C++ range proposal

Ali Çehreli acehreli at
Tue Sep 17 17:56:56 UTC 2019

On 09/17/2019 04:39 AM, Gregor Mückl wrote:
 > On Monday, 16 September 2019 at 20:29:02 UTC, Ali Çehreli wrote:
 >> Given all those important observations about C++ that are on just one
 >> subject, C++ is proof how irrational humans can be. Humans continue
 >> spending immeasurable amounts of time and money to stick with C++. We
 >> should see anthropological, psychological, mass hysterical, whatever
 >> research on this human behavior. (Stockholm syndrome has been
 >> suggested in the past.)
 > It's not too irrational to stick with a certain programming language.

Agreed because it's human to stick with status quo.

 > Is
 > it more irrational for a team to
 > - continue building out an existing, working, potentially sprawling C++
 > code base or

Agreed again but most of those teams are hurting every single day on 
every single line of code.

 > - rewrite things in a different language entirely or
 > - introduce a second programming language for new features with
 > corresponding interop challenges?

Good points but I don't think good amount of thinking is applied to the 
language choice. It's more like "No CTO will be fired for choosing C++."

 > The reality is that there is a whole bunch of C++ code out there that
 > you can't easily use from other programming languages. Some of the code
 > is industry standard, a single implementation, and barely bindable to
 > other compiled languages.* All this past investment in C++ codebases
 > that is still paying off today  is what keeps people from moving on. In
 > order to get people to switch away, you have to show them that they can
 > get a larger payoff of some sorts by switching.

I really don't think CTOs give serious thought on development costs 
either. From my limited experience it was more like "we will go with C++".

 > * A lot of published open source for professional graphics falls into
 > that category.

I don't have experience in that domain but I wrote ImageMagick bindings 
once for an experimental project. (I used the C API; I don't know how 
hard their C++ API would be to use with D.)

Recently I wrote a D API where alternative C++ API exists (for ROS). 
Yes, I spent more time writing the API (three months total for the API 
and the application itself) but in the end we gained expertise on the 
domain, can make any change orimprovement whenever we want, and our code 
runs faster. Every situation will be different but I think we gained in 
that case.


More information about the Digitalmars-d mailing list