News for hackers. Stuff that matters.
Re:D Programming Language by arcadia_leak on Thursday February 12, 2026 @05:11AM (#46986936)
I'd rather say that the GC is the superpower of the language. It allows you to quickly prototype without focusing too much on performance, but it also allows you to come back to the exact same piece of code and rewrite it using malloc at any time. C# or Java don't have this, nor can they compile C code and seamlessly interoperate with it — but in D, this is effortless.

Furthermore, if you dig deeper, you'll find that D offers far greater control over its garbage collector than any other high-level language, to the point that you can eagerly free chunks of allocated memory, minimizing or eliminating garbage collector stops where it matters.

Re:D Programming Language by ceteia on Thursday February 12, 2026 @07:51AM (#46988183)
Do you know of any popular real-time (for some definition of real-time) applications written in D? Like, streaming music or video? C has FFmpeg [0]:

> FFmpeg is proudly written in the C programming language for the highest performance. Other fashionable languages like C++, C#, Rust, Go etc do not meet the needs of FFmpeg.

How does D perform in benchmarks against other programming languages?

[0] https://www.linkedin.com/posts/ffmpeg_ffmpeg-is-proudly-writ...

Re:D Programming Language by arcadia_leak on Thursday February 12, 2026 @08:07AM (#46988363)
D by definition meets the FFmpeg's criteria because it's also a C compiler. Because of that I never wondered how D performs in the benchmarks, as I know for sure that it can give me the performance of C where I need it.
Re:D Programming Language by ceteia on Thursday February 12, 2026 @09:38AM (#46989380)
But then, to use D for performance, would I then have to master both D, C and their interaction? That doesn't seem great. It's like having to learn 2 languages and also how they interact.
Re:D Programming Language by atilaneves on Thursday February 12, 2026 @12:32PM (#46991908)
No, you can just write D. It'll have the same performance as C, if you write C-like code. It might have better performance than C if you use templates (just like in C++).
Re:D Programming Language by ceteia on Thursday February 12, 2026 @12:38PM (#46992051)
But why then did arcadia_leak imply as far as I understood him that C is needed for performance in D?

But D is not included in the benchmarks game at debian.net, which isn't fair to D either as far as I can tell.

Re:D Programming Language by igouy on Thursday February 12, 2026 @03:12PM (#46994438)
Re:D Programming Language by petre on Thursday February 12, 2026 @01:10PM (#46992613)
Not necessarily, you can just call the functions in the C library from D as you'd call them from C or C++ with the added benefit of being able to leverage the D GC, RAII, macros etc.

https://dlang.org/spec/interfaceToC.html

Dunno about the Debian benchmarks game or their build environment. I did my own benchmarks and it was quite easy to write working D code compared to C, C++ or Rust. I used LDC, the LLVM D compliler as opposed to DMD. Dub is not that seamless compared to Cargo but given that you have to set things up manually, it doesn't encourage dependency hell.

If you're writing networking code, Go is probably a better choice than vibe.d.

Re:D Programming Language by nicwilson on Thursday February 12, 2026 @08:19AM (#46988504)
Sociomantic (bought by Dunhumby, now defunct IIRC) had a realtime advertisement business built in D.

Weka have a realtime distributed filesystem written in D, used for ML/HPC workloads.

Re:D Programming Language by ceteia on Thursday February 12, 2026 @09:44AM (#46989462)
> Weka have a realtime distributed filesystem written in D, used for ML/HPC workloads.

This https://github.com/weka ?

Most of the D repositories appear to have very little activity. The Go repositories seem to have more activity.

Re:D Programming Language by schveiguy on Thursday February 12, 2026 @02:56PM (#46994200)
That's the public stuff.

An example of Weka talking about how they use D (there are more examples at this and other dconf presentations): https://www.youtube.com/live/Ou4KUBjr_78?si=bPOs-19gPemQe_ap...

Re:D Programming Language by gavinray on Thursday February 12, 2026 @10:21AM (#46989900)
dplug is a framework for building audio plugins that do realtime signal processing, and its creator has produced several well-sold plugins under the "Auburn Sounds" studio name.

https://github.com/AuburnSounds/Dplug

Re:D Programming Language by ceteia on Thursday February 12, 2026 @11:44AM (#46991041)
Interesting. That might fit the bill, though I am not completely sure.

Do you happen to know why D has not been accepted into the benchmarks games at debian.net? I heard that D developers contributed D code, but that D was never accepted.

Re:D Programming Language by igouy on Thursday February 12, 2026 @01:23PM (#46992826)
Re:D Programming Language by rafaelmn on Thursday February 12, 2026 @05:35AM (#46987079)
> C# or Java don't have this, nor can they compile C code and seamlessly interoperate with it — but in D, this is effortless.

C# C interop is pretty smooth, Java is a different story. The fact that C# is becoming the GC language in game dev is proving my point.

>Furthermore, if you dig deeper, you'll find that D offers far greater control over its garbage collector than any other high-level language, to the point that you can eagerly free chunks of allocated memory, minimizing or eliminating garbage collector stops where it matters.

Yes, and the no-gc stuff was just attempts to backpedal on the wrong initial decision to fit into the use-cases they should have targeted from the start in my opinion.

Look D was an OK language but it had no corporate backing and there was no case where it was "the only good solution". If it was an actual C++ modernization attempt that stayed C compatible it would have seen much better adoption.

Re:D Programming Language by arcadia_leak on Thursday February 12, 2026 @05:44AM (#46987143)
> C# C interop is pretty smooth

True, but you still need to either generate or manually write the bindings. In D, you just import the C headers directly without depending on the bindings' maintainers.

> If it was an actual C++ modernization attempt that stayed C compatible it would have seen much better

Any D compiler is literally also a C compiler. I sincerely don't know how can one be more C compatible than that.

> Yes, and the no-gc stuff was just attempts to backpedal on the wrong initial decision

I think that it was more of an attempt to appease folks who won't use GC even with a gun to their head.

Re:D Programming Language by rafaelmn on Thursday February 12, 2026 @05:58AM (#46987227)
I'm not saying D didn't have nice features - but if D/C#/Java are valid options I'm never picking D - language benefits cannot outweigh the ecosystem/support behind those two. Go picked a niche with backend plumbing and got Google backing to push it through.

Meanwhile look at how popular Zig is getting 2 decades later. Why is that not D ? D also has comp-time and had it for over a decade I think ? Zig proves there's a need that D was in the perfect spot to fill if it did not make the GC decision - and we could have had 2 decades of software written in D instead of C++ :)

Re:D Programming Language by arcadia_leak on Thursday February 12, 2026 @06:14AM (#46987346)
> D/C#/Java are valid options I'm never picking D

This is perfectly fair.

> D was in the perfect spot to fill if it did not make the GC decision

I just find it hard to believe that the GC is the one big wart that pushed everyone away from the language. To me, the GC combined with the full power of a systems language are the killer features that made me stick to D. The language is not perfect and has bad parts too, but I really don't see the GC as one of them.

Re:D Programming Language by zem on Thursday February 12, 2026 @05:39PM (#46996297)
go had a similar early trajectory where c++ programmers rejected it due to the gc. it gained traction among python/ruby/javascript programmers who appreciated the speed boost and being able to ship a single static binary.
Re:D Programming Language by Cloudef on Thursday February 12, 2026 @07:49PM (#46997479)
Its not the GC, its that D has no direction. Its kitchen sink of features and the optionality just fragments the ecosystem (betterC, gc) etc, making reusing code hard.
Re:D Programming Language by thezipcreator on Friday February 13, 2026 @05:15AM (#47001070)
this is the main issue I think with D, yeah.

regarding kitchen-sink-ness it's at least nowhere near as bad as C++, but that bar is basically below the ground anyway so it's not much to write home about.

Re:D Programming Language by bw86 on Friday February 13, 2026 @05:44AM (#47001259)
> Why is that not D ?

You never get a second chance at making a good first impression.

I believe that many people that gladly use Rust or Zig or Go nowadays would be quite happy with D if they were willing to give it a fair evaluation. But I still often find people going "D? I would never use a language where the ecosystem is split between different standard libraries"/"D? No thanks, I prefer compilers that are open source" or similar outdated claims. These things have not been true for a long time, but once they are stuck in the heads of the people, it is over. And these claims spread to other people and get stuck there.

If you do not want to use a GC, it is trivial to avoid it and still be able to use a large chunk of the ecosystem. But often avoiding GC at all costs is not even necessary - you mostly want to avoid it in specific spots. Even many games today are written with tasteful usage of GC.

The one thing that really is a fair disadvantage for D is its small community. And the community is small because the community is too small (chicken/egg) and many believe in claims that have not been true for a long time ...

Re:D Programming Language by arcadia_leak on Friday February 13, 2026 @06:01AM (#47001362)
> You never get a second chance at making a good first impression.

There's a good number of younger programmers like myself who've never heard of D, say, before 2017 when those false claims were still true. Our first impression of D comes from its state today, which is not that far behind from other emerging languages.

Re:D Programming Language by xigoi on Thursday February 12, 2026 @07:16AM (#46987850)
> The fact that C# is becoming the GC language in game dev is proving my point.

Popularity is not proof of anything. C# is popular because it’s made by Microsoft and rode the OOP hype.

Re:D Programming Language by arcadia_leak on Thursday February 12, 2026 @05:50AM (#46987175)
> The fact that C# is becoming the GC language in game dev is proving my point.

Respectfully, it doesn't prove your point. Unity is a commercial product that employed C# because they could sell it easily, not because it's the best language for game dev.

Godot supports C# because Microsoft sponsored the maintainers precisely on that condition.

Re:D Programming Language by cardanome on Thursday February 12, 2026 @08:47AM (#46988778)
> The fact that C# is becoming the GC language in game dev is proving my point.

That is just the Unity effect. Godot adopted C# because they get paid to do so by Microsoft.

C# allows for far lees control over the garbage collection compared to D. The decision to use C# is partly responsible for the bad reputation of Unity games as it causes a lot of stutters when people are not very careful about how to manage the memory.

The creator of the Mono runtime actually calls using C# his Multi-million dollar mistake and instead works on swift bindings for Godot: https://www.youtube.com/watch?v=tzt36EGKEZo

Re:D Programming Language by debugnik on Thursday February 12, 2026 @05:57PM (#46996476)
C# wouldn't be a problem for Unity if they hadn't mapped most engine abstractions to class hierarchies with reflection-based dispatch instead of value-type handles and the seldom interface, and had dropped the Boehm GC. .NET has actually got a lot of features to avoid allocations on the hot paths.
Re:D Programming Language by pjmlp on Friday February 13, 2026 @03:34AM (#47000395)
The problem is called Mono, and Unity's refusal to pay for an update.
Re:D Programming Language by thezipcreator on Friday February 13, 2026 @05:17AM (#47001085)
instead they made (or funded? not exactly sure) il2cpp which is a batshit compiler that compiles IL to C++ for better performance, I guess.

sidenote, I wonder how many other low-level to high-level compilers exist out there. can't be many.

Re:D Programming Language by debugnik on Friday February 13, 2026 @11:40AM (#47004670)
AFAIK, the original reason to build IL2CPP was to appease console certification and leave behind Mono's quirky AOT on iOS. Capcom is also using their own C# implementation targeting C++ for console certification.

Allegedly some games are now managing to ship on console with ports of .NET NativeAOT.

Re:D Programming Language by debugnik on Friday February 13, 2026 @11:44AM (#47004723)
I agree Mono is bad compared to upstream .NET, but I used to write game prototypes with it back before .NET Core without as many performance issues as I still find in Unity. It was doable with a different mindset.