Ask HN: Why isn't D more popular?
8 comments
D didn't have a big company behind it. I believe the main implementation is also closed source, mainly the work of one guy initially, who happens to be around on HN.
Seems to be open source now: https://github.com/D-Programming-Language/dmd
I thought D was backed by Facebook
D is publicly used by Facebook, but I don't think for production -- it's used for their style-checker
https://code.facebook.com/posts/729709347050548/under-the-ho...
https://code.facebook.com/posts/729709347050548/under-the-ho...
D has been around for 15 years.
A few possible reasons I can think of:
* The benefits it offers over C++ are (or were) not significant enough to make people invest in the switch
* There were issues in the past with a poor initial standard library (Phobos 1), which led to an alternative standard library, Tango being developed - which was incompatible with Phobos, and resulted in a somewhat divided ecosystem where you had to prematurely pick one or the other. Eventually these issues were ironed out and an improved Phobos became the standard library, with Tango made compatible with it. (The damage was already done though.)
* Library availability lacked compared with C++ - although D could import C standard libraries it was not ABI compatible with C++, and its target audience - C++ programmers, were not going to throw away backward compatibility with all of the libraries they had already written.
* As you suggest, the word "Garbage Collection" scares some people away, despite it being optional.
* It's not backed by a big name - and our industry is obsessed with big names.
* Perhaps a lack of literature and interest by academic institutions to teach it.
None of these are issues for present-day D, but I think people's perception of the language is still affected by them.
* The benefits it offers over C++ are (or were) not significant enough to make people invest in the switch
* There were issues in the past with a poor initial standard library (Phobos 1), which led to an alternative standard library, Tango being developed - which was incompatible with Phobos, and resulted in a somewhat divided ecosystem where you had to prematurely pick one or the other. Eventually these issues were ironed out and an improved Phobos became the standard library, with Tango made compatible with it. (The damage was already done though.)
* Library availability lacked compared with C++ - although D could import C standard libraries it was not ABI compatible with C++, and its target audience - C++ programmers, were not going to throw away backward compatibility with all of the libraries they had already written.
* As you suggest, the word "Garbage Collection" scares some people away, despite it being optional.
* It's not backed by a big name - and our industry is obsessed with big names.
* Perhaps a lack of literature and interest by academic institutions to teach it.
None of these are issues for present-day D, but I think people's perception of the language is still affected by them.
It is indeed a really nice language. My biggest irritation with it was that it can't parse C headers, so even though you save programming time vs C++ due to its higher level of abstraction and flexibility, you lose a lot of that time redeclaring C prototypes and/or fighting with SWIG.
Also, at the time I was using it, there were 3 main compiler implementations, which were not entirely compatible with each other, and the dynamic linking story was poor.
EDIT: Also at the time I was using it (about a year ago), the package manager was very buggy and inflexible. It assumed that each package would output exactly one library or one binary.
Also, at the time I was using it, there were 3 main compiler implementations, which were not entirely compatible with each other, and the dynamic linking story was poor.
EDIT: Also at the time I was using it (about a year ago), the package manager was very buggy and inflexible. It assumed that each package would output exactly one library or one binary.
Rust has memory safety without garbage collection; D requires garbage collection for safety. That's the biggest difference, I think.
>D requires garbage collection for safety.
Source? D has more users[1] and is more Robust than Rust and beats Rust on many benchmarks[2]
[1]http://www.tiobe.com/index.php/content/paperinfo/tpci/index....
[2]http://attractivechaos.github.io/plb/
[2A]http://benchmarksgame.alioth.debian.org/u64/which-programs-a... (D is not included in this benchmark, but judging by how it compares to C++ and C, it most likely would beat Rust in the second category.
Source? D has more users[1] and is more Robust than Rust and beats Rust on many benchmarks[2]
[1]http://www.tiobe.com/index.php/content/paperinfo/tpci/index....
[2]http://attractivechaos.github.io/plb/
[2A]http://benchmarksgame.alioth.debian.org/u64/which-programs-a... (D is not included in this benchmark, but judging by how it compares to C++ and C, it most likely would beat Rust in the second category.
I didn't say anything about number of users or about benchmarks.
I really want to start playing around with D but my biggest concern is the number of available libraries. That's not going to stop me from using it but it is a concern of mine.
You should check out the dub registry (at http://code.dlang.org/). I've found that pretty much everything I've ever needed is there, and everything else can be found via a quick google search.
Play around with the D... in the library? shame on you!
I think the reason in the long run will be that it's a bad language. It has stuff in the standard library like passing lambdas and strings as template parameters. And the complexity it has is often the language trying to hack around its own bad design.
If you think D is bad you must think C++ is atrocious.
I'm not sure how low level your thinking. But golang is somewhat notable here. It's gaining a lot of traction in the cloud space mainly thanks to Docker.
A nice write up here: http://redmonk.com/dberkholz/2014/03/18/go-the-emerging-lang...
It's probably not an alternative to C/C++ and perhaps what it's used for is not systems programming in a strict way. But most software today is related to the cloud in one way or another. And Golang is picking up traction here that might otherwise have gone to these other languages you all mentioned.
It's probably not an alternative to C/C++ and perhaps what it's used for is not systems programming in a strict way. But most software today is related to the cloud in one way or another. And Golang is picking up traction here that might otherwise have gone to these other languages you all mentioned.
While not related to Rust, I think you and a lot of commenters in this thread might find this helpful:
http://programmers.stackexchange.com/questions/97207/what-do...
And this is from two years ago, so I would expect the language to have come even farther since then.
http://programmers.stackexchange.com/questions/97207/what-do...
And this is from two years ago, so I would expect the language to have come even farther since then.
What would be a reason to not use D and prefer for example on Rust for system programming? Is D slower due to garbage collection?
Or in other words, why D didn't "replace" C for system programming?