Well, this was an answer to your own question, namely if Go or Rust or D
realistically attempt to replace C++ (as proposed by James).
OK. I'd like to hear his thoughts on why he may think that they won't do that to
any significant degree, if he thinks that.
I just tried
to imagine what might mean to "realistically replace C++" and to draw
some logical conclusions from this.
Of course, in the environments in which those languages are being developed,
they have already replaced C++. "replacing C++" is an idea mostly brought from
die-hard C++ users, I think. Defensive posturing or something. Language
developers/development usually arise out of need to solve a particular problem
(and that problem may be something like "C++ is so difficult and expensive to
use, let's invent something else and use it") without a care to "compete with
C++".
Sorry if you don't like the result. I
am not sure I like it either (though I have no problems with C++ being
over-blown or something, if it is too complex for the job at hand I just
use some other tool (typically bash/grep/awk or something like that)).
Languages are tools, to help out with specific jobs, so I find all these
quests for the "best language" a bit silly. Hopefully my conclusion (that
any "replacement" of C++ would be necessarily much more hairy than C++
itself) helps to show how ridiculous this all is.
I think you are thinking about it the wrong way. You are basically saying that
to "replace C++" it "has to be C++". You are being in-the-box paradigmatic.
Maybe the most significant issue with C++ is that it tries to be too broad,
people buy into that, and then have to deal with all the trapping of C++ all of
the time when most times they are not necessary. It's like wanting to be
prepared for the worst all of the time, and that time may never or usually
doesn't arrive. There is going to be another hurricane in Florida. I don't know
when, but I am sure there is going to be. So, better keep the plywood on the
windows all of the time, because it IS going to come.
When I chose C instead of Pascal, even though there was all kinds of push to get
me to learn Pascal, even in college, and then in industry, I chose C because I
didn't want to close any doors on what I could build with the language. I did do
some work in Fortran and Basic too, but ultimately rejected those for C also. In
retrospect, that is not a good strategy when there is a better tool for the job.
That "job" may be the language of choice for 80% of the coding while C++ may be
the niche 20%. Like C is to assembly language! That's probably what I'm after
with my language creation: relegation of C++ to the niche 20% to avoid being
faced with all that heaviness when it is just an unnecessary nuisance. But I
digress.
D is probably too close indeed and does not offer so much added value.
As a first language it stands a better chance than with those already knowing
C++. For me it would not have made the cut even if I didn't already know C++,
because D seems to be so heavily defined by GC. So maybe it's characterizing
trait is GC. That's my perception anyway. You don't have to use the GC, but I
think that lops off a big chunk of the feature set and libraries (?).
What benefits would these be?
Well, money talks. James likes to tout "large scale development" as a stronghold
of C++. I think C++ is in a precarious position with that because I think it
will be easy to deliver projects for less cost using something else. Simple
answer: money.
Rewriting millions of lines is bound to
introduce a lot of new bugs (i.e. additional costs) unless the new
language is really good (an order of magnitude better than anything we
have so far).
That is weaselly: "order of magnitude". It doesn't have to be "10 times
cheaper". Half as much may be fine. 10% may be. Some other project, maybe 1%.
Expense is expense: less is better.
Of course, rewriting a million lines of C++ code in the new language, would
result in some significant number of lines less than that. Less code = less
bugs. Better language constructs = less bugs. Increased developer productivity =
less expense... etc.
I know how to do this. I just don't know how long it's going to take and how
much it is going to cost to build it and prove it. What I DO know is that when
the project is done, the actuals will match the planned, exactly.