Hacker News new | ask | show | jobs
by fluffybucktsnek 19 days ago
Tbf, I'd say Rust's concepts of Trait Objects and Generics are better implementations (in general) of C++'s inheritance and templates, respectively, rather than entirely different things. I'd also add constexpr/const blocks to good ideas to add, or else generics/templates will be abused (yet again).
1 comments

There is no inherit in Rust. If you choose to try and do OOP horror Rust makes this fairly painful
I know. I mentioned C++ inheritance because it's its default dynamic dispatch mechanism that I'm aware of.