5 ms·
Certainly D has a lot of support for hobbyists and solo developers, but hasn't seen much adoption from industry. It's a tough language to sell to a large organ
by Kranar 6y ago
Certainly D has a lot of support for hobbyists and solo developers, but hasn't seen much adoption from industry.
It's a tough language to sell to a large organization. When you're a solo developer D gives you the flexibility and freedom to pursue the many different paradigms that it supports and create your own mini-dialect of the language that suits you perfectly. You can sprinkle some garbage collection here if you want, some meta programming there if you'd like, or narrow things down to a barebones strongly typed C-like language. There's a great deal of exploratory freedom in that respect.
When you're in industry, those freedoms can become liabilities because you end up paying the cost of the language supporting things you have no use for. I don't want to pay for D's garbage collector and I don't large teams all writing up elaborate template metaprograms that have to be maintained. If I wanted a garbage collector, then C# or Java is almost certainly the better choice. If metaprogramming is what I want, I'd use a Lisp dialect like Clojure. For any specific feature D has that would be a major selling point or competitive advantage for my company, there's another language that is almost certainly far better suited to providing it. There isn't one single language that does everything D has, but there's also no single project that would want to make use of all those features, and this becomes very apparent when you see how fractured the D community is and how many mini-dialects of the language there are. Do I support GC or not? Do I make it compatible with betterC or not (meaning exception support).
Having a kitchen sink like language results in those kinds of trade-offs. Good language for carving out a niche for yourself that can adapt to your specific style of programming and give you as an individual a great deal of expressive freedom... bad for when you need to coordinate with a large team and buckle down on a small set of rigorous and specialized features that are likely better served by using a tool focused on delivering it.
- throwaway316943 6y agoSounds like it’s perfectly suited for indie game development where everything plus the kitchen sink is a must and the more customizable the better.
- Kranar 6y agoThat's an excellent point actually. I think as a language D could work well for indie games but even there... if you're an indie developer do you go with D or with Unity (which uses C#)? That said, in principle one could imagine a version of Unity that used D instead of C#, and I think that would be a pretty neat combination.
- p0nce 6y ago> if you're an indie developer do you go with D or with Unity (which uses C#)? You would have to weight this choice against existing engines like Unity/Unreal/Godot vs custom. I released a game with custom engine in D once and what really mattered was that there was no market fit (and no sales). Choosing engine vs custom is a question that only exists if people materialize to play your game ; a lot of successful game shops are prototype-heavy or at least advise that strategy.
- bsdooby 6y agoFunny, you say that: I just asked for D support for Unity a few days back on D's discord server...
- throwaway316943 6y agoAre custom language bindings a thing for Unity now?
- mhh__ 6y ago> but there's also no single project that would want to make use of all those features, In practice, you'd be surprised. Some of the things like -betterC were solely developed as a toy, but nearly everything I can think of in D has a use and is useful when used as intended. The people who do use D in industry use those features - this is still 80-20 as with many things in programming, but (for example) first class unit testing is so blindingly obvious you'll miss it when you don't use D. One of the reasons why you would use D is that you can pick and choose because one day you will (say) hit a performance wall and need inline assembler, then goodbye clojure (for example). Just do what works for your project, the code is a lot harder anyway. Obviously it's a self-selecting group, but these problems really don't exist all that much when you are actually writing software - libraries, yes, programs not so much.
- WalterBright 6y agoSure, you can find better GC support in languages that are built around GC, and you can find better functional support in languages that are built around FP, better OOP support in everything-is-an-object languages, but what D does is enable one to mix & match GC, FP, Metaprogramming, etc., in the same program. Most D programs I write use a mix of these technologies. As for metaprogramming, D is very very good at it.