https://github.com/kubernetes/kubernetes/blob/master/CHANGEL...
Kubernetes alternatives (?):
The D programming language was trendy for a bit, 15 years ago. Now it's just old tech people make blogs about reviving retro games as a gimmick. It never got substantial traction because it sat half way between Java and C++ in a way programmers from neither camp would switch to it. Rust is fundamentally different, it attacks C++ at its heart and is not only a better language, but a superior programming platform. In a few years the ecosystem will be large enough that there are no reasons for anyone to choose C++ anymore, and at that point, what is the relevance of D?
Is this for GC code or just @nogc and DasBetterC? Ownership seems a bit heavy when running the GC.
Saying that "@live" feature is "adding Rust's ownership and borrowing" is technically accurate, but in reality I'd be surprised if it were used in production in major systems in the next 5 years.
The @live feature has multiple problems:
- The author wants it to be implementable incrementally (eg some code uses @live, some doesn't), but doing so isn't really feasible in safe code. From the moment you disable GC, you either need your entire program to respect some strict memory model (in which case you basically have a new programming language, and no incrementality), or your program won't be any safer than C++. This is not hyperbole: Rust-with-unsafe and D-with-@system is safer than C++, because you only need to audit an annotated subset of your codebase. D-with-@live (or more accurately, D-with-@trusted-@live) is not safer, because a memory error can come from anywhere in your program.
- Speaking of a memory model, D doesn't have one. Rust has Stacked Borrows, which gives library developers a framework to know whether their unsafe code might lead to undefined behavior. D doesn't seem to have nailed down semantics as to how @live might create/affect undefined behavior (which means the semantics will probably be "whatever the DMD/LLVM/GCC backend wants").
- Rust has Non-Lexical-Lifetimes (and soon Polonius). D's documentation is very sparse about how lifetimes in @live will be determined, but I think it's safe to assume that it will be scope-based at first. This means that, eventually, when @live ships, it will be roughly equivalent to Rust as it was in 2015. Not great.
And, finally, saying that Rust will decline because another language will add OB misses what makes Rust great.
The strength of Rust is that things work by default.
A quick search through D's forums will raise dozens of instances of people complaining about edge cases in the language, things that don't work exactly as expected or produce undefined behavior (autodecoding and uninitialized variables come to mind).
Rust has very few problems like that. If your Rust code compiles, it will work. You will never have a bug that happens on a coworker's machine but not on yours, or a crash that happens because you used two niche features that weren't designed to be used together.
If your code crashes, it will be in a predictable, reproducible way, with an error message and a stack trace to tell you what to fix.
Rust isn't perfect, but it's infinitely less fragile over time than D.
On @live, I'm not sure Walter is going in the right direction, but I think some of your arguments aren't the strongest. I have no issue with the incremental use of @live. People who use D know the difference between @system/@trusted/@safe and @live (esp. when @live is actually shipped and there is adequate documentation). The relevant question @live supporters could make is if @system/@trusted with @live is safer than without it. I think your point about D not having a memory model might be fairer, I'm not really in the position to judge it. Your final point is a bit weaker. Walter could easily argue that the idea is to move towards incorporating these features from Rust. Of course Rust is going to be further ahead on this. @live is also not thoroughly documented and there's a lot left to be determined.
I think on @live I've been most convinced by skeptics that something like a new type qualifier or storage class is better. This storage class would basically enforce the equivalent of Rust's borrow checker (as in @live) and only allow one mutable or unlimited const references but not both. Users can also apply it incrementally, but is a bit more significant of a change than @live.
@live also has non-lexical lifetimes: https://forum.dlang.org/post/[email protected]
D is Lindy Effect. It's been around for 19 years, it'll probably stay around for at least another 19.
> The Lindy effect is a theory that the future life expectancy of some non-perishable things like a technology or an idea is proportional to their current age, so that every additional period of survival implies a longer remaining life expectancy.[1] Where the Lindy effect applies, mortality rate decreases with time.
So Rust may be hot now– but remember, NoSQL and Docker were hot once too, and they are now not popular.
Plus D is adding Rust's ownership and borrowing.
D compiles faster than C++20 and is easier to learn.