D has become unbearable and it needs to stop

Z3Solver z3solver at proton.me
Fri Jun 30 17:55:38 UTC 2023


Putting in my 2 cents. I used to work as a professional D 
developer, made a living off of it for a year or two, and then 
became quickly disillusioned with it. Hell - DMD has not worked 
for me on aarch64 macOS for the past 6 months, even after 
updating to the latest version of both macOS / DMD available due 
to some obscure linker error that I sincerely cannot be assed to 
dig into. It just doesn't work, so I've just avoided writing D 
like the plague (or just use ldc, which has always worked!).

In my eyes, D is like the perfect embodiment of "move fast, and 
break things", but sans the "you need to fix those things at some 
point after you break them", and like OP mentioned, so incredibly 
frustrating to deal with.

I tried. I genuinely did. But there are so many rough edges, as 
well as a complete reluctance to try New Ideas That Are Proven To 
Work Elsewhere. Because we have to do it the D way -- whatever 
the hell that means.

I'm personal friends with a few engineers at Facebook, and 
learned the reason why Facebook dropped D. I mean, hell, there 
was huge internal hype about it there, as well as major 
investment in the language; it was seen as the replacement to C++ 
and was paraded around as the Next Great Thing (TM). Hell - they 
even hired on Andrei & Walter, as well integrated it fully into 
Buck (Facebook's internal build tool). You know what happened? 
Facebook engineers ran into so many headaches and issues with D 
that they chose to drop it entirely, and in its place came a 
language that you might've heard of: Rust. Need proof? Look at 
what languages are implemented in Buck2 - you'll notice that 
there's a stark lack of D anywhere.

I'm genuinely shocked that D is still used in production 
anywhere. It feels like you need to take the Symmetry approach of 
writing your own standard library (and be incredibly selective 
about which features you use - e.g. the majority of Mir is 
written with @safe @pure @nogc, which made it an absolute joy to 
work with) just to even be able to use it in a remotely 
productive way. And even then, you start to run into some serious 
rough edges with dmd and work around compiler issues all the time.

This doesn't even get into my criticisms of the language itself. 
The level of compiler metaprogramming that D encourages its users 
to use has so many footguns, combined with a compiler that has so 
many incredibly bizarre design decisions (seriously, DMD has 
caused me to OOM my entire system on multiple occasions) that 
I've become incredibly incredibly skeptical that it was a good 
idea to begin with.

Now I write Rust professionally and don't have any of these 
pains. I have new pains, of course, but at least my "new pains" 
are addressed by the community / language maintainers in a 
reasonable timeframe, whereas some of the compiler bugs I've 
reported have gone unseen unless I made an absolute fuss about it 
on the Discord. I don't have to worry about my crates magically 
breaking if I update the compiler. I don't need to worry about my 
code randomly getting slower to compile if I update the compiler. 
I can use every part of the standard library and not have to 
worry about (x) or (y) - unlike tar pits like std.regex, or 
std.string. Sure, the cognitive load is higher since I now need 
to worry about ownership / borrowing, and I sometimes need to 
fight the borrow checker, but in return I get a language that is 
incredibly reliable & ergonomic to use.

I wish you all well, and I wish D could've worked out. I really 
wanted to like the language. There are so many great lessons that 
can be learned from D. But viewed holistically, I cannot 
recommend any new developers to write any code in D.


More information about the Digitalmars-d mailing list