6 ms·
Everytime I read about D I think it fits the definition of the oft-quoted "boring technology" perfectly. One has to wonder why it did never take of like say Go.
by ofrzeta 6y ago
Everytime I read about D I think it fits the definition of the oft-quoted "boring technology" perfectly. One has to wonder why it did never take of like say Go. This has to be one of the greatest historical accidents in the evolution of programming languages.
- gkya 6y agoD is featureful and harmonious but it's inevitably complex. With Go, you learn the grammar in one or two days and from then on almost all you'll ever need is the library docs. It has a Scheme-like quality in that aspect, but it combines that with a usual procedural imperative approach and a standard library that has more than call-cc. A lot of languages have a lot of "syntactic sugar" but actually what's important is more invisible basics: good GC, good concurrency primitives, good method dispatch, good and comprehensive standard library, supportive compiler, etc. Go has a few warts (the whole select / <-chan syntax, god-mode functions like `make', the interface{} problem, the whole go mod / dep kerfuffle), but it does tick all those boxes. Ofc all that modulo the Google factor, but then there's Dart...
- pjmlp 6y agoDart tried to replace JavaScript and faced oppposition from Apple, Mozilla and Microsoft on that regard. Just like we have WebAssembly because those same companies did not bought into PNaCL.
- raverbashing 6y agoTo me the weirdest thing about Go is the package/directory thing It's a weird way of enforcing structure and the last time I looked into it I couldn't get my head around it
- mhh__ 6y agoThere aren't really that many gotchas in D, either. I may be misremembering, but when I was learning D the only thing the spec was useful for was for metaprogramming, everything else was pretty obvious.
- gkya 6y agoNot exactly gotchas, but things to learn. Syntactic complexity is the first barrier to entry to any language, and it's the hardest part to learn as you go, because in general looking up functions (or classes, etc.) as you need them is easier than looking up syntax (and esp. syntactic patterns, like `<type> <name>(){}' or `val ? branch : branch'. I.e., say we need ten features to make up any language. Perl arranges six of these into syntax. Go arranges say two of these into syntax. C++ arranges five into syntax. For D, I've had little exposure but for better or worse let's say it arranges 4 into syntax. For each, the rest are in the std lib. The extreme cases would be, maybe Scheme for 1/10; can't think of any 10/10 syntax languages. In that light, we can say that Go requires less upfront investment in order to become productive and read code easily: learn two features + how to lookup docs. Versus in D: learn 4 features + how to look up docs. That's pretty ad hoc, but I hope it helps get the point across.
- mhh__ 6y agoD has the unfortunate issue of being ahead of its time (i.e. using niche programming languages only really became a thing a few years ago), so it's not "cool". It's a shame really, because I see a lot of languages throwing around D features like C++ interop saying theirs is the best when D's C++ interop is both years old now and battle tested every single day. D also solves a problem you can't really know you have unless you have a deep knowledge of programming. The idea that if you want to write small code vs. fast code rather than both in the same language in very strongly ingrained because we traditionally teach people C++ and/or Python and that's it unless you do advanced courses (to learn something like Haskell which still doesn't help), even though both are fairly crummy programming languages. If all goes to plan I may be working to help popularise the language soon, so we'll see about all that.
- chromatin 6y agoGood luck. Our academic group adopted it because it allows us to be both incredibly productive and have performant code, and both python and Go programmers were able to get up to speed quickly. With respect to being ahead of its time, there are many features that have been in D for years slowly making their way to other languages, including C++. In that respect it is successful, but certainly I would like it to be successful on its own.
- skocznymroczny 6y agoMain issue is, D is suffering from "Lisp curse" [0]. Read the Lisp curse article, but exchange Lisp for D and you'll have a good idea of the problem. D is very similar to Lisp in many aspects. It's a powerful language which allows you to create your own minilanguage within a language. In Lisp, you'd do it with macros, in D you can use templates. This makes it a secret weapon which appeals to lone wolf programmers, but it makes it harder to interact within a wider community. Similar with the language features. D allows multiple paradigms, as a result, many libraries don't interact well together. Some people code in OOP fashion, some people refuse to use the garbage collector, some people even reject the entire runtime (betterC_mode). [0] http://www.winestockwebdesign.com/Essays/Lisp_Curse.html http://www.winestockwebdesign.com/Essays/Lisp_Curse.html
- kazinator 6y agoThe Lisp Curse is an ignorant diatribe that was written by a (then) junior web developer with no Lisp experience, and has basically been disowned by its author. His request to "please stop submitting this to Hacker News!" should be interpreted in its strongest form; i.e. including comments. It's right there, at the top: the first thing you read. D looks fine. It suffers from the curse that we cannot have 1000 languages be popular simultaneously. Popularity is a game of musical chairs. People who don't get chairs when the music stops are not always the clumsy ones who lack athleticism and reflexes. Sometimes, in that crucial moment, the nimble one is just far from the closet chair relative to the klutz whose butt is inches from the seat. In popular culture, popularity wanes fairly quickly. Yesterday's idol is quickly forgotten. Like Billy Joel's line in "The Entertainer": "But I know the game, you'll forget my name / I won't be here in another year / If I don't stay on the charts." In computing, we can't swap tools quite that fast. So for fairly long periods of time, popularity begets more popularity. Something is popular today because it rose to popularity some years ago. (Some things have longer cycles, some shorter.) Anyway, that alone creates a barrier to entry, similar to a monopolistic barrier. No matter how good something is that you create, it just doesn't have ... the popularity to make it popular.
- appleflaxen 6y ago> junior web developer with no Lisp experience, > and has basically been disowned by its author. I see the comment at the top about not re-submitting to HN, but I don't see disownership or disavowal. Is it posted somewhere? Because asking not to resubmit (which GP didn't), is not the same thing as saying "my conclusions were wrong".
- attractivechaos 6y agoI wrote a blog post in 2012 [1]. It gives my thoughts on the topic. In brief, D was quite popular around 2008 when no decent C++98 replacements existed. However, the D1-to-D2 transition, the Phobos/Tango (two core libraries) drama and the non-open-source components have ruined its reputation. I still love D but with the standardization of C++11 and the rise of Go and Rust, D won't have a chance again. [1]: https://attractivechaos.wordpress.com/2012/02/28/timeline-of-the-d-programming-language/ https://attractivechaos.wordpress.com/2012/02/28/timeline-of...
- pjmlp 6y agoAdditionally C# and Java have been getting better AOT compilation story, value types support and native memory handling, so metaprogramming is the last big feature standing. Which is quite unfortunate, as the language is quite appealing and the community always has interesting discussions.
- WhoCaresLies 6y agodotnet and Java stand no chance in the modern world They are heavy, bloated, and try to do everything, at the end of the day they pick the lowest common denominator, for everything, and they ship it They want compile to a small executable, they are stuck and ended up just zipping everything and calling it a day They want to interop with native world, but they introduce runtime overhead and their GC/memory model is a barrier They want to AOT compile, but their runtime and libraries rely a lot on runtime reflection They want to be tiny, but they have ton of legacy package that makes them very heavy Just look at the success story of go, it invalidates any attempts to make both dotnet and java attractive, it is too late, even more too late in an ARM world where relying on a JIT is a weakness
- vips7L 6y ago> They are heavy, bloated, and try to do everything, at the end of the day they pick the lowest common denominator, for everything, and they ship it What does this even mean? > They want compile to a small executable, they are stuck and ended up just zipping everything and calling it a day Both can compile executables the same size as go? See core-rt or the graalvm native-image compiler. > They want to interop with native world, but they introduce runtime overhead and their GC/memory model is a barrier Java's GC's are probably better than any on the market, including go's. And I will agree that currently native interop from the JVM is more expensive than it should be, but they're working on it. > They want to AOT compile, but their runtime and libraries rely a lot on runtime reflection. Easily solved by just declaring what you reflect upon or using runtime agents to find it. It's more difficult than a language than was designed to do it from the start, but eventually all of the big libraries will have it declared already. Hibernate already does [0][1] [0] https://github.com/hibernate/hibernate-orm/blob/5eedda9a467fef44d924f64203023b2345b8415f/hibernate-graalvm/src/main/java/org/hibernate/graalvm/internal/GraalVMStaticAutofeature.java https://github.com/hibernate/hibernate-orm/blob/5eedda9a467f... [1] https://github.com/hibernate/hibernate-orm/blob/5eedda9a467fef44d924f64203023b2345b8415f/hibernate-graalvm/src/main/java/org/hibernate/graalvm/internal/StaticClassLists.java https://github.com/hibernate/hibernate-orm/blob/5eedda9a467f...
- qalmakka 6y agoI think that the dispute around Phobos in 2010 together with C++11 froze the enthusiasm that was brewing around it. Rust nowadays got much more mindshare than D ever had, and C++17/20 while extremely complicated is "good enough" for a lot of folks out there. Also, I think that stuff such as garbage collection and reference types seriously fell out of fashion, because there's no way in hell lots of C folks will ever consider a language with them, sadly.
- pjmlp 6y agoDepends who you ask, yeah certainly not fashionable in UNIX circles, but that is more to computing than that. And since we are speaking about games here, https://docs.unrealengine.com/en-US/ProgrammingAndScripting/ProgrammingWithCPP/UnrealArchitecture/Objects/Optimizations/index.html#garbagecollection https://docs.unrealengine.com/en-US/ProgrammingAndScripting/...
- qalmakka 6y agoSadly, "being fashionable in UNIX circles" is more important than it sounds, because those circles have quite a lot of skilled people, mindshare and staying power and they contribute to lots of critical components that only now are (partially) considering to accept contributions in a different language than C, and that's because that language is Rust (see Linux, GNOME, etc). The refusal of C++ from those "UNIX circles" has led to decades of reinventing the wheel from people that reimplemented all sorts of weird hacks in C for reasons that basically boil down to a strong, unsatiable desire to avoid C++ at all cost (see Glib, Gtk+, etc).
- skocznymroczny 6y agoRust did a good thing by creating its own niche. D has constantly tried to appeal C++ programmers, implementing features such as better interop with C++ and a lot of advanced template structures. But C++ programmers won't go to D anyway, any language with a GC is dead in C++ programmers' eyes, even if it's reasonable argument or not.
- benibela 6y agoI wonder the same about Delphi/Object Pascal