3 ms·
Rust is based on ADTs, typeclasses, and type parameters. C++s toolkit for abstraction is templates and OOP. They're completely different, and it sounds like you
by ilovecaching 8y ago
Rust is based on ADTs, typeclasses, and type parameters. C++s toolkit for abstraction is templates and OOP. They're completely different, and it sounds like you're just trolling anyway.
- MarkovUnchained 8y agoC++ has ADTs from C++17 and will have typeclasses from C++20. Templates with type traits are effectively a superclass of type parameters anyway.
- iopq 8y agoTemplates generate bad error messages because they are duck-typed. Rust is better at this.
- Rusky 8y agoC++'s ADTs are std::variant, which is horrific. C++'s type classes are concepts, which are hardly more than syntactic sugar over SFINAE. Neither can really compare to Rust's enums or traits.