tags:

views:

563

answers:

4

I have tried to find some information on D. I do especially like this comparison with C++ to get an overview on what it is. Now I am asking myself: how often D is used in the field, and how much of a viable alternative is it to C++?

+7  A: 

I think D is a great language, but what people might hold back from using it is that it is (afaik) not compatible with c++ libraries. So all libraries you can use have to be written in C or D. So if you are a C++ developer switching to D isn't so much fun.

Mobbit
D2 will have limited compatibility with C++ libraries. http://digitalmars.com/d/2.0/cpp_interface.htmlAlso, if you have C wrappers around those libraries, D fully supports the C ABI.
dsimcha
why is that of particular concern? What are the libraries that are incompatible and why does'nt D provide its own?
Johannes Rudolph
Since D emphasizes that it should be simple to implement the language, so to keep the complexity down, it doesn't support everything in C++ (which is syntactically a very complex language) because that would mean practically having a C++ compiler in the D compiler. This reduces the number of libraries that can be interfaced with, and there's not a list of which ones work and which ones don't. D doesn't provide it's own because it's still young - it only came out in 2007, whereas C++ has had decades to amass libraries.
Cristián Romo
+2  A: 

The primary impediment to wide spread use of D is the lack of a 1st class IDE (like VS), immature tools sets and libraries. The IDE issue is improving with Descent and it is expected/planed that once D version 2 comes out the the two libraries will merge. The tools issue is also improving but more slowly. (IIRC there has been some progress as of late on getting D support in the official GDB)

BCS
surely an important point.
Johannes Rudolph
A: 

For me, D's biggest problem is the lack of a strong corporate backer or "crown jewel" software which uses it. Java had Sun. C had Bell Labs and had Unix written in it early. C++ had AT&T and afterward Microsoft. C# has Microsoft.

Not so. The hallmark of programmers is that they're lazy. Going to D is a lot of work without the C++ compatibility.
Calyth
I don't agree either. What about Python? It had no "corporate backer" and is now in the top 10 languages (maybe even top 5 depending on what you're counting).
Jyaan
+2  A: 

I do not see it used much around me (scientific computing). D could be a viable alternative for many cases in scientific computing where C++ is used now. For me personally, two things are keeping me back from using it:

  • No stable D2 specification yet. D2 and D2 Phobos is on par with (and arguably better) than C++ and the STL. D1 Phobos however is not even near a replacement. But since D2 is still a moving target, it may not be well-suited for programs yet.
  • Lack of a D2 compiler that supports x86_64. This is absolutely problematic for my field, since datasets have grown so much that you need more than 4GB of memory to efficiently process data, and 64GB machines have become commonplace.

If these two problems are solved, I will seriously consider D in the future besides OCaml and Haskell.

Daniel de Kok