235 points · by mepian · 2y ago · 311 comments
Almost everything I liked in D when Andrei Alexandrescu's book came out in 2010, have made its way to C#, Java, C++.
Yeah, maybe the implementation isn't as nice as in D, but that hardly matters when the implementation is available in some form, with much better tooling and library ecosystem.
Too many years lost chasing the golden feature that would bring people in, without stabilitizing those features.
Even Andrei is nowadays apparently mostly busy with C++ and CUDA than D.
And then there is the whole compile to native programming languages renaissance from the last decade, adding even more competition.
Which is a pity, as the community itself is full of great folks to talk with.
I am using Python every day. And there are many things from D which I miss. Not to mention the performance.
It does decrease compilation speed, because O/B requires data flow analysis. However, this is speed slowdown only happens for the functions marked as being O/B functions.
Circle does not, in fact, have working Rust style lifetimes. Sean splits the Circle documentation into features which work and "Research" features Sean is working on and lots of interesting ideas, including lifetimes, are in the second category. Maybe Circle will implement them some day, or maybe it will not.
While I wish Adam and the others success with OpenD, I hope they can take the opportunity to pick a more unique/memorable name.
Oh, didn't know that they are working on this.
https://github.com/coq/ceps/blob/coq-roadmap/text/069-coq-ro... and, of course, https://news.ycombinator.com/item?id=38779480
069-coq-roadmap.md? Oh, you!
So now we've got Rocq and Roc https://www.roc-lang.org/
And no, I didn't miss the joke :)
I'm sure that there are legitimate gripes and D's reliance on Walter as gatekeeper may be too strict for some but the way this fork has started out doesn't bode well for the long term. Forks succeed only if they are carried broadly, you'd need to more or less pull a majority of the folks in the D community along rather than just a handful of prolific but ultimately low in number individuals because there is a fair chance that both your fork will fail and that you further fragment the mindshare of the original to the point that it too looses any viability that it still had.
You also need to be able and willing to support it for decades.
Personally, I think it’d have been more fun if they named it ‘Died’ — you get the benefits of sweet taglines “It never Died,” a statement about it being a fork, and the permission to take the language in new directions if that makes sense in the future. OpenD implies full compatibility, etc..
(I have no skin in this game, though. Good luck!)
sounds from this like the people forking basically want a different language, for which they're willing to make a number of breaking changes.
Honestly, I've always felt really confused about what D's vision is. I've tried reading some of the docs about certain language features like better see and safe mode and lifetimes and they've been grammatically just kind of hard to read and generally poorly explained, despite going into great detail on things, and I've never really been able to get a sense for a coherent design vision or purpose for the language. The author mentions that this has been a problem, but I don't feel their vision is really any clearer. Yes they have a few concrete midterm technical goals, which is great, but it isn't clear to me what those goals are in service of. Honestly, I'm a rust programmer, so you know what I do for Greenfield personal projects, but I'd rather just use OCaml, C++, or even C# if I had to pick something else.
Yeah, for a long time the language was marketed as a better C++. That was wrong for two reasons. First, it's a C++ replacement, but it's not C++, as many C++ developers learned in frustration. Second, it's a lot more than a C++ replacement. It works for scripts, as a general programming language, and especially for C interop (ImportC, BetterC, etc.)
One of the goals of the fork is to stop apologizing for the GC. You still have reference counting, unique pointers, and whatever in the standard library. I'm sure if someone wants to contribute functions that avoid the GC, they'll be accepted. What you're not likely to see with the fork is Adam writing new functions for the standard library that go to great lengths to avoid the GC. He believes fear of the GC is overblown.
Also, this idea that fear of the GC is overblown — I buy that for servers and applications and the like for the most part (although I think our obsession with using heavier and heavier runtimes and frameworks to ease development at the cost of efficiency is unsustainable in the long term and has contributed significantly to the bloat of modern systems), but for real-time work, or embedded systems, or low level programming that needs to implement the sort of things a GC or runtime relies on, which are the only things I think most people claim GCs aren't good for, I really don't buy the argument that GCs don't matter. Yes you can do such things with languages that have them, especially if you have cutting edge GCs like Java's ZGC or turn your runtime into bare metal hardware drivers like Miranda did with OCaml, but oftentimes that's just harder to reason about and control, more work, and has costs (like ZGC needing 2x the memory and roping all pointer accesses into doing GC work to amortize processing costs), so it's like that article about using C# to do a <2KB game — why not just use things more well suited for that. This is a common sentiment I've seen in the D community though, so let me ask directly: is this argument a response to people who are claiming not to want a GC for low level / systems programming, in which case I don't think it's very reasonable, or is this a response to people who balk at GC for server and application stuff, in which case I'm not sure anyone disagrees? Or is there a third option I'm missing?
Most of the changing languages that come to mind, I realize, that they, too, had a big upset or oops related to governance.
I now think one of the key things to look for in a programming language is governance -- what they say about how they do it, what they actually do, how that's working out so far, and how you think that will work out in the future.
For example, if a language designer and implementor says upfront that they want to run it as Benevolent Dictator For Life, and also that they don't want to see feature PRs from people, because they prefer to work through all the details themself... That's their right, and great information to have upfront. That governance might tentatively work for some adopters, and others will decide it's a showstopper without needing to explore further.
Correction: "We might not be able to say".
IMHO that's the main reason why C became so popular, compilers are free to explore into different directions, language extensions that have proven their worth will eventually be picked up by other implementations, and sometimes even make it into the standard without being butchered too much by the committee agreement process.
open-D is not a 4th implementation it's a fork.
Language design is difficult. Features interact in complicated ways. Fixing mistakes is tricky - you break existing code.
Forking D sounds fine. It's easier to start with an implementation than to go from scratch. Ideas which work out well get to have a existence proof when proposing them to the original. Ideas that crash and fail don't add to the debt of the original language.
I hope the fork goes well and this proves a net gain for the original ecosystem.
D is much more closely a competitor of C# than it is C++. D has a few nice features like advanced compile time programming but the actual nuts and bolts that Staff engineering management looks isn't really solid. D's GC is a design straight out of the 80's. Dmd has good compiler throughout but code quality isn't very good. Ldc is much better but compile times are much longer.
Adopting languages at FAANG beyond a single team just yolo deploying them to production requires integrating dozens of engineering systems for everything from post mortem debugging to live profiling to authentication systems. The cost to do this is in the order of tens of millions of dollars.
D just isn't suitable as a C or C++ replacement in the places that actually require it and the cost to enable it in large companies isn't worth it for the incremental improvement it does offer in some areas.
D could have been something but most people avoided it because of the commercial nature, i.e. not being Free software.
D is a very small community , so this seem to be a big bet
It's too early to judge how much support there will be. I don't expect current users to split into camps though. My prediction is that the relationship will end up being similar to Ubuntu vs Debian. An example is string interpolation. Walter wants to stick to his own proposal, which nobody else likes, while Adam's already implemented his proposal in OpenD.
> Again, remember, I have other work and responsibilities, so I can't do a great deal of work myself, even if I wanted to.
I'm far more concerned about community development of libraries, IDE support, and the beginner experience (especially on Windows) than I am about changes to the language, which is already pretty good. As a Linux user working on top of C libraries, the experience is incredible. That's not the case for everyone.
What changes would you like to see happen?
That being said, never assume that no response from someone means someone doesn't care. I felt awful when dealing with situations like this. If this were my project, I would probably be extremely frustrated and more than a little bummed, whether or not I thought the fork was understandable.
Those are not things that are constructive to air in public, though, and I think it is a mark of leadership that Walter's dialogue remains as calm and polite through all of that thread as he usually is.
Contrariwise, I read through that forum thread and some of the linked github issues, and it wouldn't be shocking if he were happy to see some of those people walk away. It would not be politic for him to say so.
Chromium is a fork of Webkit which is a fork of KHTML. If you use a web browser, that browser is either Firefox or a fork (of a fork) of KHTML. I don't know what percentage of Chromium/Webkit users have heard of KHTML, but I'd recon it's on the order of 1%.
mplayer used to be a very popular, very good media player, mostly for linux but it was cross platform. Development sort of died. These days its fork mpv is much more common.
There used to be many different forks of GCC. In 1997, all of these developers merged their forks together into the EGCS project. This project proved to be very active and very...good. It was so good that the FSF halted development on mainline GCC, forked EGCS into the new mainline GCC, and restructured the community built around the ideas of the EGCS community. If you use GCC, this is the version you use; forked from GCC into EGCS, forked from EGCS back into GCC.
MacOS' kernel is a fork of FreeBSD. Much of its userspace is a fork from ... somewhere. If you use MacOS it's forks all the way down.
Kindle is forked from Android and/or linux and/or... well it's complicated. Amazon forked a lot of stuff.
Much of the Android ecosystem has been forked. OpenSSL was forked into Tink, for instance. Again, complicated, lots of forks.
yt-dlp was forked from youtube-dl when ... the lawyers came.
Ubuntu is a fork of Debian.
Firefox is also a fork of Mozilla (later renamed to Mozilla Suite, itself forked into Seamonkey[0] when Firefox became the main browser the Mozilla Foundation decided to stop developing the Mozilla Suite).
Now we have 3 D compilers: DMD (the de facto standard), LDC, and GDC.
I guess the OpenD project will have their own compiler, too. Well... let's see.
Anyhow, D went from a language that I remember back in 2015 was often promoted on places like reddit and here as a fresh alternative to C++ that was constantly evolving, to nowadays you rarely hear anything about it at all. I think even Andrei Alexandrescu has given up on it.
Good luck to these guys on trying to bring life back to it, but frankly I think at this point most people have given up and moved on to alternatives like Rust, Nim, Zig, etc...
I never saw the need for it, really. I just stuck with the language constructs in C++ that makes it basically impossible for memory leaks/use after free/use outside of bounds to occur or if they do occur, explode loudly in debug environments. I haven't used new/delete in a personal project in like a decade; longer than Rust has been around.
Now I'm working on a project where the main developer is...a cowboy. Everything is insane. Not only is new/delete everywhere, but so is malloc/free. In C++ code. You have to navigate to where the thing is allocated to figure out whether to use free or delete. Everything leaks, everything crashes, everything races, everything deadlocks.
Oh and the guy is my boss.
So on the one hand, rust might fix these problems, on the other hand, rust is a non-starter.
So now what. I still don't need rust because I don't code like a crazy person. And the people who do code like crazy people will never use it anyway because it doesn't let them...express themselves.
While I’m not yet out to rewrite all the things in Rust, I understand the appeal of rebooting archaeological projects with a modern approach.
For me there are three reasons why Rust is suitable for many usecases:
- performance
- safety
- static binary compilation with targeting different cpu architecture
After spending majority of my time with Python and Java in the last 10 years these are things i really learned to appreciate.
I ended up jumping over to Zig and have been really enjoying it. I ported the same hobby 2D game engine project from C++ to Rust, and then over to Zig. A simple tile map loader and renderer took me about a week to implement in Rust and 3 hours in Zig. The difference was a single memory bug that took 15 minutes to figure out.
I've found that data structures with _lots of helper methods_ (thinking about things like `Result` in particular) tend to be nice. You do have to learn about Rust-specific things to figure out how to nicely structure your code for everything to work. But the payoff is less pain.
There are still a lot of futzy ownership questions, and even when you write out your supposedly performant and cool system, easy outs like cloning end up hiding in your system leading to some awkward performance questions. Fortunately the systems are merely slow, and it tends to show up in profiling.
Not quite. The problem with D is that it was a better C++ than C++98.
In the meantime the C++ world woke up from it's freeze and the standardization process started addressing the requests from the C++ community. Consequently once C++11 was out and work picked up on following standard versions, D ceased to have a selling point.
> One of the guiding principles of this fork is to embrace the GC as a successful design rather than to shun and avoid it. [...] I have harshly criticized @nogc in the past as putting a disproportionate burden on library authors while being the wrong answer to what can be a perfectly fair question.
[0] https://dpldocs.info/this-week-in-d/Blog.Posted_2024_01_08.h...
If that argument were solid, Golang would not be more successful than Dlang, but reality is, Golang numbers are just so much bigger.
PTC, Aicas, microEJ, Astrobe, Meadow,...
The problem isn't having a GC, is its poor implementation.
Do you have an opinion on how the GC schism within D affected it competitively with regards to C/C++?
1. Make class methods open to extension. This allows adding methods from other contexts, including other privacy contexts. Sure you could have dedicated syntax like C#'s extension methods, but these were added after the fact. If starting your language from scratch, while have two distinct syntaxes, when one will do?
2. Allows to add methods that only exist for some combinations of generic parameters. For example you can have a generic `Foo<T>` class, and then define a method `from_bar` that only exists for `Foo<Bar>`. Again, impl blocks may not be the only solution to this, but it is a highly cohesive one.
3. Lastly this is more philosophical, but it decouples the data definition from the method definition.
Not wanting to try Rust because its syntax is unfamiliar has to be the weakest reason, especially when the syntax has excellent reasons to be different.
The thing that moved me away from it was a lack of purpose, which isn't exactly how I would have put it at the time, but in hindsight seems obvious.
The way in which I'm certain that this is true is that if you had the leads try to create a Venn diagram of what the project does and what is central to it vs periphery, they would fail to agree. And if they fail to do that, they will fail to coordinate on the features. And that creates the stagnation and difficulty with contributions.
As well, the reason why that failure leads to a retreat into technical digression - which I know happens out of personal experience - is because that deflects questions by adding scope. It promises an escape from the confrontation: "if I just accumulate more work, it will all come together someday". The problem is that adding scope doesn't solve the contradictions that made you retreat in the first place, it can actually deepen them by creating sunk costs. It's a bad adaptation to the challenge.
If we compare it with, for example, the Niklaus Wirth approach, he would have the Venn diagram completely clear in his mind before committing to any real implementation. And therefore the language would do exactly what he wanted it to do, and it wouldn't need to be scoped into a 20-year project. Thus, he made many languages during his life, mostly of a similar flavor, but with a clear intent of adding something specific that he hadn't covered before.
And back in 2015, folks were saying the same thing, but with different alternative languages. I remember twenty years ago when C++ was dead. Oh, and remember the good old days when Java was dead?
I'm not sure why programming language discussions always turn into quantitative statements that have no data, but fully support the commenter's position.
I remember 25 years ago when StarCraft was dead and Age of Empires was it. It happened at the same moment my university switched from C++ to Java. I hated that change.
And I remember 15 years ago when the biggest e-sports events in the world were done using StarCraft.
Today I am back in university, and we are using C++. =)
I don't think many people thought C++ was dead 20 years ago; that seems like revisionism. Same with Java.
People looking for a C++ replacement have definitely moved on to Rust, Zig and maybe Go & Nim. Not D. I don't see how you could seriously argue otherwise.
Some languages are pretty easy to predict, e.g. Ruby is going to decline quite quickly. C++ is going to stick around for a long time because of its current enormous usage. PHP will probably stick around for a while but slowly decline like Visual Basic and Perl. Rust is going to gain in popularity for a long time and probably stick around for a very long time.
Some are more difficult to predict. I'm not sure what will happen to Go or Nim for example.
Sure they did. Bjarne was in that camp. That's why C++11 came out, and the C++ of 20 years ago is dead.
> Same with Java.
It was very common to hear comments like "The JVM is great, but Java is terrible. Use Scala, Clojure, [language of the month]."
> People looking for a C++ replacement have definitely moved on to Rust, Zig and maybe Go & Nim. Not D. I don't see how you could seriously argue otherwise.
Do you have some numbers on how many moved to Zig and Nim? I'm not looking for "I've seen comments on the internet" but actual numbers. I'd expect it to be rounding error relative to the population of C++ users. And I seriously doubt the numbers would be very high for Go.
But the point still stands that people have been saying this about D for a gazillion years. It might be more credible if they'd at least change the story up a bit when they say it.
That's not the case. The job of language designers is to say "no" all the time and Walter is certainly a model with how to speak with users.
I don't think it's intentional but the argument always begins with explaining some detail as if you didn't know it existed even though you'd have to do be able to bring it up in the first place.
This is not just me, I've had this discussion with a few people. One of a short list of complaints of this kind it must be said.
I wrote a blog post in 2012 about D [1]. In my personal experience, the high point of D was around 2008-2009. It was already declining in popularity in 2012, IMHO, due to intense clashes within the D community and the rise of Go, Rust and C++11 outside the community. D remains one of my favorite languages but I agree with you that Rust, Nim or Zig is the better choice for most programmers today.
[1] https://attractivechaos.wordpress.com/2012/02/28/timeline-of...
Heck, even .NET is pushing NativeAOT (their brand name for native code compilation) hard these days. Still with sizable gaps but closing for every new release, and you can now develop full fledged desktop apps or a web service and have it be self-contained with native code.
I think .NET in particular is a harbinger for D. When even a "managed language" platform at its core goes native code, and with Microsoft's industry backing giving an entirely different angle of attack than D's minimal defense, you just know it's over. D will live on but in the way Amiga, SNES, ZX Spectrum lives on among enthusiasts.
NGEN, only usable for fast startup, using dynamic linking.
Singularity and Midori respective C# dialects.
MDIL in Windows 8.x based on Singularity Bartok compiler toolchain.
.NET Native on UWP, taken from Project N, inspired by Midori's System C#.
Mono AOT used by Xamarin for iOS and Android.
Homebrew OS like CosmOS.
Unity's IL2CPP toolchain.
Not welcoming for everyone apparently. I don't know much about D, beyond seeing a post from some dev rage quiting D every few months, due some people in the community being terrible and the leadership not stepping in to limit that.
OpenD is not that awesome.
It's hard to say whether I is available, or un-googleable.
J through W are also taken.
X++ is taken, but X seems to be available.
Y and Z are taken.
A would be an excellent choice were it not completely un-googleable.
Finally, B is a famous precursor to C.
D doesn't have state of the art GC, it perhaps should focus on its strengths, being a better C/C++ and embrace the concept of allocators
https://dlang.org/phobos/std_experimental_allocator.html
To me D shine with its -betterC mode, it completely strip the runtime, giving you a great low level language to work with, a great better C/C++, I would have quit D a long time ago if it didn't have this compiler flag
Removal of the GC makes for CTFE code becoming much klunkier.
One can see this in betterC mode - the GC is allowed for CTFE code.
It seems a lot of the other languages:
- don't have an easy compilation story (interpreted, VM, compilers as secondary implementations)
- lean more on the functional side (Ocaml, Haskell)
- otherwise clash with the common BCPL-family mindset (Oberon, arguably Go)
There definitely seems room for an "easier C++". Heck, given how popular Rust is due to backing and support from the functional crowd, leaning into ease of use and imperative programming might be a sufficiently large niche.
"Pythonic" hasn't been "intuitive" for 15 years now. Even old-school Perl is more cohesive and coherent than modern Python.