tags:

views:

461

answers:

3

Has someone here ever had experience with the D programming language?

It seems to have many nice features but will it ever reach the popularity of those currently widespread languages like C++, Java or C#?

So is it worth learning or is it an isolated language with minor prospects.

+14  A: 

I spent a few days playing with D to see how it compares to C++ and java. It is positioned as another way to achieve the same things C++ does, but without all the undefined behaviour, and with the addition of a garbage collector, foreach loop, and some other modern niceties. It compiles to native code so you get access to all the usual optimisations that can occur from this scenario.

The entire C language is encapsulated as a subset of D as the lower level building blocks from which much of the language is constructed. This can help with portability, but also prevents D from evolving into single consistent methodology.

The ability to run any C function natively in D opens up the realm of possibility to include systems programming - operating systems, drivers, etc.

There are two commonly used class frameworks in D. The default is Phobos, which is rather spartan and simple in design, allowing you to create the structures you need, but providing few large or complex building blocks. The other is Tango, which is reminiscent of the java class library and contains a much more complete framework. There is also a project to allow interoperability of the two libraries.

In my experience, D is quite a nice language for coding, having a lot in common with C# and java, and allowing access to the raw machinery through C and even assembly interop. The main limitation I see is a lack of good development tools support. There are some IDEs and plugins out there, but nothing very complete, so you might be better off with a text editor and a command line build tool in the meantime.

There are two versions of the language, D1 and D2. D1 is better supported by frameworks and compilers for now, and D2 has added a few convenience features that make the language easier to deal with and use.

Update: I have recently been looking into D again and thought I should draw attention to DSource, which now has a number of different compiler projects, and is the home of the Tango library, various bindings, several GUI toolkits, and a couple of IDEs. Some of the projects were abandoned in their infancy, but I believe there are quite a few going strong today, and making good progress. At this stage, it looks very much like the success of D will be determined by the open source movement far more than by its progenitors.

IanGilham
+1. A fair assessment of the current state of affairs, though rapid progress is being made on the toolchain front. See LDC (http://www.dsource.org/projects/ldc) and Descent (An Eclipse plugin: http://www.dsource.org/projects/descent).
dsimcha
@dsimcha: Ditto on the tool chain comment, it's improving rapidly. If the tool chain were even 80% as good for D as for C++, then I think C++ would rapidly become a legacy language. Given time, I think it will get there.
BCS
@BCS: I agree, the fact that D has even this level of support this early into it's life may be an indicator of it's future success.
Cristián Romo
+1  A: 

When looking at things like language popularity, etc I have found Tiobe to be a good resource http://www.tiobe.com/content/paperinfo/tpci/index.html

As you can see D is in the top 20.

Oorang