3 ms·
> D's attempt to become an alternative to C and C++ was eclipsed by Rust, which doesn't have the GC overhead and has a ton of other really compelling features.
by Ace17 10y ago
> D's attempt to become an alternative to C and C++ was eclipsed by Rust, which doesn't have the GC overhead and has a ton of other really compelling features.
Rust isn't just a better C++, it imposes a new paradigm over resource management (lifetime oriented programming?). If you're coming from C++, you have to change your way of thinking.
D doesn't try to make you follow any paradigm (for the better and for the worse) ; and its syntax will feel natural and terse for a C++ programmer.
My experience (10 people team) has shown all C++ programmers can learn D very quickly. Is this the case for Rust?
> Why would anyone choose D today? (Serious question.)
Native speed, on-demand deterministic destruction, on-demand memory safety, metaprogramming, fast compile times, terse syntax.
- oddity 10y agoI'm tempted to think that Rust doesn't really impose a new paradigm over resource management so much as it standardizes and enforces the common conventions of C++ resource management. A major pain point probably is that people never really followed the "conventions" of C++ resource management as rigidly as Rust enforces them.
- lbrandy 10y ago> A major pain point probably is that people never really followed the "conventions" of C++ resource management as rigidly as Rust enforces them. That's exactly right. Rust does a great job moving idiomatic C++ best practices into the type system and actually forcing you to do it "right". And alot of the early pain people run into when switching to Rust is learning how to do this. I suspect very experienced C++ programmers have alot less challenge getting spun up on Rust. It's sorta front-loading the pain of discovering and learning C++'s best practices. As a side effect, though, it means alot of Rust evangelism misses the mark as it mostly reveals their own C++ weaknesses (this is, on a different level, an indictment of C++, and its learning curve, but not really in the ways the evangelists often believe).
- SamReidHughes 9y agoI'd amend this to say it's a subset of the C++ conventions.