Is D a credible alternative to Java and C++? [closed] Is D a credible alternative to Java and C++? [closed] java java

Is D a credible alternative to Java and C++? [closed]


What determines the success and popularity of a programming language for real-world software development is only partially related to the quality of the language itself. As a pure language, D arguably has many advantages over C++ and Java. At the very least it is a credible alternative as a pure language, all other things being equal.

However, other things matter for software development - almost more than the language itself: portability (how many platforms does it run on), debugger support, IDE support, standard library quality, dynamic library support, bindings for common APIs, documentation, the developer community, momentum, and commercial support, just to name a few. In every one of those regards, D is hopelessly behind Java, C++, and C#. In fact, I'd argue it's even behind so-called "scripting" languages like Python, Perl, PHP, Ruby, and even JavaScript in these regards.

To be blunt, you simply can't build a large-scale, cross-platform application using D. With an immature standard library, no support in any modern IDEs (there are plugins for both Visual Studio and Xamarin Studio/MonoDevelop), limited dynamic/shared library support, and few bindings to other languages, D is simply not an option today.

If you like what you see of D, by all means, learn it - it shouldn't take long if you already know Java and C++. I don't think evangelism would be helpful - at this point if D is going to succeed, what it really needs is more people quietly using it and addressing its major shortcomings like standard library and IDE support.

Finally, as for C++, while most agree the language is too complex, thousands of companies are successfully using C++ as part of a healthy mix of languages by allowing only a smaller, well-defined subset of the language. It's still hard to beat C++ when both raw performance and small memory usage are required.


Just to add my own experiences into the mix:

About a year ago I worked on a small scale game project (3 coders) lasting 3 months, where we used D as our primary language. We chose it partly as an experiment, partly because it already had bindings for SDL and some other tools we were using, and mostly for the benefits is appeared to have over C++.

We loved using it. It was quick to learn and easy to write. Many of it's features proved invaluable, and I miss them having gone back to C++.

However, the following points made our lives more difficult:

  1. There was no good IDE at the time which was a major issue. We ended up making our own by customising Scite. This worked ok, but was not ideal.
  2. There was no debugger at the time. We managed to get WINDBG to work on a hit-or-miss basis, but it was unreliable. Debugging code without a debugger made life hellish at times.
  3. There were 2 standard libraries to choose from at the time (Tango and Phobos). We started with one, switched to the other, and really needed a mixture of features from both (Tangobos!). This caused headaches and some code re-write.
  4. Bindings to other tools not available. In the end we had to switch to DirectX (for reasons I won't get into). There were no bindings for DirectX available so we had to write our own in C++, build it as a .dll and bind to that. This was fairly nasty work and took some time.

Overall, we loved to write D. It made actually writing code easy and was quick to learn. The issues I've mentioned echo the answer that has been accepted for this question - it's the "extra" bits that need addressing in D, the core of it is solid.


I agree that C++ is becoming a dead-end language - and it pains me to say that, after having used it for the last 17 years.

I think D is the rightful successor to C++. From a language perspective it "does all the right things" (even if I don't agree with every minute decision). I think with C and C++ on the decline there is no other systems level language that can really do what they do, while holding itself up in the world of modern languages - except D! Not only does D fill this role - it excels at it! A look at D1.x should be enough to convince you of that - but when you look at D2.0 it blows you away. It is my opinion that there is no other language around today that works as well as D2.0 in bridging the imperative and functional programming paradigms - which is only going to get more significant in coming years.

Lack of mainstream acceptance - or even visibility - as well as large scale, mature, libraries - are an obstacle of course. However I don't think you can write it off because of this. I am convinced that D will grow to become one of the most important languages around within the next few years - and those that are taking it seriously now are going to be well placed to take the lead when that time comes.

I think the difference is going to come about due, in large part, to Andrei Alexandrescu's involvement. That's not to discredit Walter Bright in any way, who has done a momentous job in bring D to the world. But Alexandrescu is an important, and compelling, figure in certainly the C++ community - and there's where most of the potential D switchers are going to come from. And he has also made a significant and important contribution to D2.0 in its support for functional programming.

It may still turn out that D is doomed to be the Betamax of systems level languages - but my money is on it turning around within the next two years.