To me, the evaluation goes solely as ecosystem vs. ecosystem
There D is ahead not so much by number of features, than by lack of showstopper flaws
To me, the evaluation goes solely as ecosystem vs. ecosystem
There D is ahead not so much by number of features, than by lack of showstopper flaws
But a killer feature that's available in C++, but not available in D is pure RAII idiom. Sure D does scoped destruction (via struct's destructor), but is in no way equal to the contructor+destructor combination in C++. struct's in D don't have default constructor, so RAII in D is just incomplete.
Automem[1] is a boon for D, but is useful only for heap memory resource. Not for all kinds of resources (like locks, etc).
On the other hand D has scope exit/failure, which is not available in C++.
[1] https://dlang.org/blog/2017/04/28/automem-hands-free-raii-fo...
* D has generally better metaprogramming, however, rust has real macros
* D has a garbage collector and defaults to code being memory-unsafe. Rust uses ownership semantics and defaults to safe code.
* Rust has only an llvm-based compiler (although possibly moving to a self-hosted one soon?). D has a self-hosted, gcc-based, and llvm-based compiler.