Quora: Why hasn't D started to replace C++?

Laeeth Isharc laeeth at nospamlaeeth.com
Thu Feb 8 03:36:17 UTC 2018


On Wednesday, 7 February 2018 at 21:02:11 UTC, data pulverizer 
wrote:
> On Tuesday, 30 January 2018 at 20:45:44 UTC, Andrei 
> Alexandrescu wrote:
>> https://www.quora.com/Why-hasnt-D-started-to-replace-C++
>>
>> Andrei
>
> The Betamax Problem
>
> When you introduce something new, how do you know that it is 
> going to be compelling enough for people to move from whatever 
> it is they are doing and use your new thing?
>
> It is not an easy question to answer but in the realm of 
> programming languages it's a very tough question, because 
> people are going to have to learn a whole new language, and its 
> going to come with costs and potentially unquantifiable risks 
> for any company that attempts to shift to that language. So 
> whatever it is you are offering has to be tremendously 
> compelling compared to what is already there.

A great deal of confusion in the world arises from failing to 
make distinctions between things that appear to be the same but 
really aren't when you look closely.

Also, in about 1870 odd there was a revolution in economic 
thought that took place more or less simultaneously in Vienna, 
Lausanne and Cambridge.  The Marginal Revolution had yet to be 
fully digested in the way people think about social phenomena.

My director of studies at Cambridge, Lord Eatwell, Labour 
spokesman in the House of Lords,  was known for his devotion to 
the work of Pierro Sraffa, a man known principally for a rather 
hostile book review of a book by Hayek and a rather slim book of 
his own, Production of Commodities by Means of Commodities, a 
book that tried to draw insights about the economy from a model 
with two goods, corn and gold.

And I think considering firms as homogeneous, with the same 
cultural values  and facing the same situation will be about as 
insightful as I think Sraffa's work ended up being - not very.

Life is risk.  It's risky to get out of bed in the morning, but 
it's also risky not to get out of bed.  And it's true that an 
agent acting on behalf of someone else - ie a manager who has no 
stake in the business - will often think about things first in 
terms of not taking a decision that might lead him to be blamed.  
But most firms are not large enterprises, and in the US small and 
medium sized firms over time create more than 100% of job growth, 
last I checked.  And a manager who is also at least to some 
extent a principal ie an owner in the business knows that to be 
conservative in a time of change is not necessarily prudent, and 
it may well also not be the profit maximising choice.

As someone who is both a manager and a part owner I disagree that 
a new technology choice needs to be overwhelmingly compelling to 
be considered.  And I don't get paid to make decisions about 
things that are easily quantifiable - what for you need me for if 
the numbers are straightforward?

The reality is that firms are very different, in a dynamic 
industry even within the same sector they are different.  And at 
any one time there are a bunch of people close to trying D or 
more.  You don't need to persuade everyone to grow.  You just 
need to persuade a few more people to tip over the margin.  And 
there are often plenty of safe ways to take risks.  You just need 
to make sure you have a plan B.  Listen to Manu's talk for a real 
example of what I mean.  And note that he said Finns are very 
conservative.

> An important question is what problem set does D solve? It's 
> very hard to sell a language to industry without convincingly 
> answering that question. If you are selling them a 'better' 
> language - that's a tougher sell. If you are selling a solution 
> to a particular problem set - you stand better a chance.

But really who is selling D to anyone? We are very far from that 
stage right now.  Did someone sell D to Microsoft COM team, 
Remedy or to Weka? Nope.  People who had earned the authority to 
decide became aware of the language end decided to use it.  And 
they did so because for them it solved their particular problems 
better then anything else they could think of.

> For a manager to consider D as the successor to C++, it doesn't 
> just have to be a better language design than C++, it has to 
> have the best language design of any compiled language and 
> demonstrate the best performance.

Why?  Best in what way? Best for whom and for what kind of 
problems?

I completely disagree with that.   It needs just to be better in 
the situation then the conceivable alternatives.  And situations 
and challenges are really quite different between firms.

  Is the former really true?
> Are various language features that have been inherited from 
> C++/Java the best way forward? For instance does D have the 
> best approach to object oriented programming, or templates? Or 
> any important set of features you care to mention? Are there 
> things that C++ does better than D? How straightforward is it 
> to get great performance from D? Is how do you 'tune' your D 
> code for high performance obvious or well documented?
>
> If the answers to any of the above questions is a negative for 
> D, that's a serious problem if what you want to do is replace 
> C++, because C++ is already a solid well know language and the 
> competition from new programming languages is extremely tough, 
> and because its only going to get easier to create programming 
> languages this competition will get tougher.
>
> To finish the Betamax story, when CD came along, people dropped 
> cassette tapes like hot potatoes and DVDs killed VHS stone 
> dead. Does D represent a similar leap from C++?
>
> I'm not saying that D is Betamax. I'm just giving food for 
> thought.

You can turn your scepticism on anything, and the value of the 
exercise really depends on the results.  But doubt on its own 
isn't necessarily a good guide to the future in my experience.

In particular with D because the benefit doesn't I think come 
from any single feature but from the totality of the gestalt of 
what it's like to work in D compared to other languages.

I think that if you want to understand the adoption of new 
technologies then Clayton Christensen's Innovators Dilemma has 
considerable insight.  Up to a point Crossing the Chasm and 
companion books too.  I think by Moore.




More information about the Digitalmars-d mailing list