4 ms·
The reason D isn't popular is simple and not a fault of the language itself. It's one of marketting. - Go is backed by Google. - Rust is backed by Mozilla. -
by katastic 9y ago
The reason D isn't popular is simple and not a fault of the language itself. It's one of marketting.
- Go is backed by Google.
- Rust is backed by Mozilla.
- C# is backed my Microsoft.
- D is backed by... D users... and the two language architects.
A few schools use it. A few companies use it.(::cough::This little company called Facebook::Cough::)
The other is target market. D appeals to a new, or more advanced kind of programmer. A new niche or category. A programmer that doesn't get produced at most colleges, or demanded by most companies. And if they're not produced or demanded, that category isn't going to fill up with programmers. Nobody would have used Java if schools across the nation didn't tell kids that "Java was cool" and the JVM wasn't something to be afraid of.
There are categories of programmers. No one can say that a LISP programmer is quite like a C programmer.
- C programmers want "nicer assembler." C.
- C++ programmers don't want a GC. (Though D is working toward a GC-less standard lib.)
- Python/Java/C# programmers are (more likely to be) afraid of systems languages that can segfault like crazy if you don't know what you're doing.
D appeals to programmers who aren't afraid of the entire stack. They write, understand or at least appreciate assembler and caches, while also dabble in high-level templates and functional programming.
I can absolutely say I've grown as a programmer after looking through D features and going, "Why don't I know how that works?"
The guys behind D are brilliant, and professional. Watch any of their talks. Andrei Alexandrescu works for Facebook and still writes plenty of C++. He also wrote THE quintessential "Modern C++ Design" book on template meta-programming. And Walter Bright has been writing compilers for decades.
This is not a toy language.
Here's plenty of benchmarks showing D as fast as (and sometimes beating) C/C++ _and_ having low memory usage.
https://github.com/kostya/benchmarks https://github.com/kostya/benchmarks
Meanwhile, the benchmark is misleading. Because not only is generally as fast as C/C++, but it's way more productive to write in.
But back to adoption. It's simple. 1) No corporate backers pushing it, 2) A language for advanced/multi-talented programmers is either scary or "unnecessary" to single-talented programmers.
Most C programmers are afraid of, or think templates are unnecessary. Most C++ programmers are afraid of a garbage collector (even if it's a completely deterministic one that only fires off during specific allocation points).
As a mostly C++ programmer, I was apprehensive of D's GC. But the more I read, the more confident I've been, and, I've had zero actual problems with it. I'm pushing 130 FPS on my netbook just fine, and because D isn't a toy language, I can easily move to static pools and have zero GC allocations.
- maxxxxx 9y ago"- D is backed by... D users... and the two language architects." How did Stroustrup get C++ popularized? It's pretty phenomenal that it got so popular.
- katastic 9y agoWell, I would venture that there was much less competition back then and fit a very important middle ground. Per wikia: >Stroustrup found that Simula had features that were very helpful for large software development, but the language was too slow for practical use, while BCPL was fast but too low-level to be suitable for large software development. And C++ was also created at the same place as C... Bell Laboratories so (while I wasn't alive then) I think people saw "the next product" coming from Bell and were interested in the next C upgrade--an extension to a product they were already widely using. https://en.wikipedia.org/wiki/C%2B%2B#History https://en.wikipedia.org/wiki/C%2B%2B#History [edit] I found a great, large PDF that details LOTS of C++ history. http://www.stroustrup.com/hopl2.pdf http://www.stroustrup.com/hopl2.pdf C++ use Date estimated number of users Oct 1979 1 Oct 1980 16 Oct 1981 38 Oct 1982 85 Oct 1983 ??+2 (no Cpre count) Oct 1984 ??+50 (no Cpre count) Oct 1985 500 Oct 1986 2,000 Oct 1987 4,000 Oct 1988 15,000 Oct 1989 50,000 Oct 1990 150,000 Oct 1991 400,000 C++ appears to be similar to D in terms of users, until corporate backers (AT&T!) came online and started pushing it with "traditional marketing", over that of e-mails and newsgroups. >electronic communication played a crucial role in this. In the early years most distribution and all support was done using email and relatively early on newsgroups dedicated to C++ were created (not at the initiative of Bell Labs employees) that allowed a wider dissemination of information about the language, techniques, and the current state of tools. These days this is fairly ordinary, but in 1981 it was relatively new. I think that only the spread of Interlisp over the Arpanet provides a contemporary parallel. Later, more conventional forms of communication and marketing arose. After AT&T released Cfront 1.0 some resellers, notably Glockenspiel in Ireland and their US distributor Oasys (later part of Green Hills) started some minimal advertising in 1986, and when independently developed C++ compilers such as Oregon Software’s C++ Compiler (developed by Mike Ball at TauMetric Software in San Diego) and Zortech’s C++ Compiler (developed by Walter Bright in Seattle) appeared ‘C++’ became a common sight in ads (from about 1988). Also, trivia piece: "Zortech's C++ Compiler, developed by Walter Bright in Seatle." That's the same Walter Bright who designed D. He also was the creator of a very popular mainframe game from the 1970's called Empire. https://en.wikipedia.org/wiki/Walter_Bright https://en.wikipedia.org/wiki/Walter_Bright D also had a couple of "smears" or "growing pains" that pushed some people away. D was originally a closed-source language that pushed many in the FOSS community away. Then, the standard library was lagging in progress so the community made their own "Tango". But eventually Phobos (the main stdlib) overtook it and now everyone uses only that. However, during that time "two stdlibs" split the already small community and duplicated efforts. The last "smear" I can think of is the garbage collector which gives C/C++ and other system programmers pause because it's a fear of the unknown and the GC hasn't been "proven" with dozens of shipped commercial applications. On the plus side: The GC is completely deterministic with when it will fire off, and people have been working to remove the GC (as it's not actually TIED to the language, but the stdlib. As opposed to say, C#, which IIRC, would be IMPOSSIBLE to use without a GC.) There are plenty of articles online with people removing GC (it's even a simple pragma), or partially removing it during critical sections, or straight up removing the entire D runtime for embedded purposes. All of which have been completely successful and not "that hard" to do since they're not that coupled together. And lastly, of course, the GC isn't that slow unless you're doing crazy allocations (add one element to an array 100,000 times) and systems programmers don't program like that anyway. Hell, I still prefer RAII. The GC only kicks in for stuff I don't care about like lambdas/closures, string/array manipulation, and functional algorithms. But I can absolutely use static arrays allocated on the stack with a single line of code. (You can even use malloc for non-GC touched data and alloca for stack allocations). There's no way I could do that in C#.