3 ms·
I will note that Rust has all of those features you mentioned. 1) Traits 2) You have to be explicit, by implementing the Clone trait, otherwise arguments are pa
by adjav 4y ago
I will note that Rust has all of those features you mentioned.
1) Traits
2) You have to be explicit, by implementing the Clone trait, otherwise arguments are passed by reference or moved.
3) Rust has both RAII and linear typing, which is effectively a proven-correct form of moves - you can't access something that has been moved, unlike C++.
Rust doesn't have class inheritance, no, but often combining traits and delegating to a "parent" field works. Although sometimes that can be considerably more cumbersome, yeah.
- ncmncm 4y agoI agree that the GP comment does not capture what Rust is unable to express.