That was fixed within the week, with a notification given that it had been sent to the reporter.
A fix is on master/beta but will still take some time to be released.
0: https://gist.github.com/ske2004/336d8cce8cd9db59d61ceb13c1ed...
D is safer and more productive. It's a joy to write in D because most of the time it feels like whatever you think, you code. This is unlike C++ where you fight the language all the time. C++ is not a productive programming language. I say this with experience: I coded in C++ as an "expert" for many many years, including these last couple of years. It's not fun to write in C++, which translates to another kind of loss of productivity.
C++ is a burden and liability for companies but no CTO will be blamed for chosing it because it's popular. I can list so many popular things and persons that worth nothing but I will refrain from getting political.
Yes, on paper, there are way more C++ programmers out there than D programmers. But I interview these C++ programmers occasionally. Most of them don't even have an inkling that they don't know C++ at all.
How about engineering with C++? That is such a difficult task. I went over header file hygiene with a colleague a couple of months ago. The number of points that you should pay attention to is mind boggling: Don't #include unnecessarily, do forward declare as much as possible (but what can be forward declared is hard to understand even for experienced programmers), #include your own API header first to prove that it's complete (and good luck!), don't forget header guards, don't reuse header guards, etc. etc. This is just efficient header file usage! We haven't started coding yet!
My friends, the emperor doesn't have clothes. C++ simply is not a tool that is designed well. People who choose it do so because they have to or they are masochists. (True story: I asked a relatively young Google meetup presenter once why he was using C++ instead of a modern language and he said "because it is hard".) C++ separates the elite from the masses; I used to strive to be a C++ elite; I am not interested a bit anymore; I want to write useful programs with D; and I do.
D is niche only because humans are populists. We are not encouraged to use tools (or products) that are designed better. We follow popular leaders. It takes one some time to find his or her own voice to reject bad products and use only good ones. I am extremely lucky to work for a company that allows me to use D to write useful products.
I still take the same joy from programming that I did when I first learned it.
Then there is the human aspect of it: I want to be associated with real people isntead of snobby elites. (Remember how C++ was marketed at around 2000? "Yes, C++ is hard but it was never meant to be for normal programmers anyway." Ha ha ha! I am old enough now to reject that mentality. Bad design is bad design my friends; you can't defend it by blaming the user for not being elite.)
I can go on and on...
Now it's my turn to ask: Why would anyone choose C++ for their projects despite the production costs that it brings? None of your programmers really know it; they introduce hidden liabilities in the projects, their source code become non-refactorable monsters. Why waste that money on C++ when you can produce products easily. Products that just work...
Examples:
* Python preferred over Ruby
* TypeScript preferred over Dart or even JavaScript (which is fine and, as a bonus, doesn't require compilation step like TS)
* Go is preferred over Crystal and D.
While Python, TypeScript and Go are quite alright, there is no doubt in my mind that their alternatives are absolutely superior as languages. Yes, in case of Dart, Crystal and D the ecosystem doesn't have the abundance of well-tested libraries, but as languages they are simply better. The Go argument that it's popular because it's simpler is absurd in the sense that no one really forces you to write complex code and use classes or other advanced OOP features in D.I actually liked D very much, and WB had been a personal hero of mine when I was in college. But I am not betting my career on an ecosystem built around by a single brilliant guy. For high-stakes projects, a wise decision is building on a platform with several deep-pocketed backers.
And for toy/personal projects... do you even need a language anymore? Just ask your favorite LLM to generate you an executable which does what you want (partially joking here).
It's not perfect, as some people cannot resist using the C preprocessor for some bizarre constructions.
I used to write those bizarre things myself in C, and was proud of my work. But one day I decided to remove them all, and the code was better.
... Perhaps what you're describing is having a niche opinion. If you had some opinions, like a preference for "Everything must be done in as many ways as possible with funky characters" or "I hate indentation", it would certainly seem that the world is against you. But, perhaps, you just really smart and can remember the intention of all the complicated code you wrote a year ago, so you don't even need to write comments, and thats great. However, being special does not mean that some technolgoy is objectively inferior, unless you can actually come up with a provably objective metric.
Overall, the technology that is there, solving most of the problems for most of the cases is the technology that is superior, by the law of the universe, not the other way around.
I don't agree with any of your examples, but I have my own, like Pascal is a better language than C, by many metrics. I can also accept that C, is what people who invented unix, also invented. And that makes Pascal inferior to C, now, as choice for any project that requires that you hire embedded software developers. That's what the universe decided.
One of my projects has a really simple server written in nodejs that's basically (in terms of complexity) just an auth'd chatroom, and I wanted to switch it from using raw tcp sockets to websockets. And since the server is so simple, why not refactor it to another language and see if there's no some performance gains from that. I ended up doing something pretty similar to that "Comparing 10 programming languages. I built the same app in all of them." video from Tom Delalande (https://www.youtube.com/watch?v=-MbTj8DGOP0). I had several working versions of the server in:
- Bun, using Bun APIs (https://bun.sh/docs/api/websockets)
- Dart, using Dart APIs (https://api.dart.dev/stable/latest/dart-io/WebSocket-class.h...)
- Java, using Java-WebSocket (https://github.com/TooTallNate/Java-WebSocket)
- Kotlin, using Ktor (https://start.ktor.io/p/ktor-websockets)
- Rust, using tokio-tungstenite (https://docs.rs/tokio-tungstenite/latest/tokio_tungstenite/i...)
- Zig, using websocket.zig (https://zigistry.dev/packages/karlseguin/websocket.zig/)
- D, using serverino (https://code.dlang.org/packages/serverino)
And Dlang was, by far, the worst experience out of the lot. Firstly is the lack of adequate, comprehensive, and centralised tooling. I almost gave up when dmd could not even compile the example project. The impression I got is that you're not really meant to use dmd directly, you're meant to use dub, like how you compile Java projects with Maven/Gradle, not javac. Except that there's also apparently three competing compilers (https://wiki.dlang.org/Compilers)? And good luck remembering the names of the tooling because they're all some random three-letter combination.
Serverino makes heavy use of mixins and annotations, which is not ideal. But what really killed the deal was (despite using the recommended intellij plugin (https://wiki.dlang.org/IDEs) with the recommended tools installed and setup) not being able to inspect serverino's mixin or its annotations. So I look at serverino's source code, except its source also has mixins... which I can't inspect. I'm not going to use something when I cannot easily ascertain its control flow.
Daunk•7h ago
WalterBright•7h ago
jadbox•4h ago
IMHO, Zig is the closest thing to being D-esk (like with comptime), but it's still not a mainstream option yet.