News for hackers. Stuff that matters.
Re:D 2.096 and other news by Kranar on Wednesday March 24, 2021 @12:24PM (#26569320)
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.

Re:D 2.096 and other news by mhh__ on Wednesday March 24, 2021 @01:37PM (#26570447)
> 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.

Re:D 2.096 and other news by WalterBright on Wednesday March 24, 2021 @08:09PM (#26574804)
Sure, 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.

Re:D 2.096 and other news by throwaway316943 on Wednesday March 24, 2021 @12:37PM (#26569509)
Sounds like it’s perfectly suited for indie game development where everything plus the kitchen sink is a must and the more customizable the better.
Re:D 2.096 and other news by Kranar on Wednesday March 24, 2021 @12:50PM (#26569750)
That'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.

Re:D 2.096 and other news by p0nce on Wednesday March 24, 2021 @02:57PM (#26571497)
> 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.

Re:D 2.096 and other news by bsdooby on Thursday March 25, 2021 @10:53PM (#26588311)
Funny, you say that: I just asked for D support for Unity a few days back on D's discord server...
Re:D 2.096 and other news by throwaway316943 on Sunday March 28, 2021 @07:21PM (#26615794)
Are custom language bindings a thing for Unity now?