3 ms·
C++ has ADTs from C++17 and will have typeclasses from C++20. Templates with type traits are effectively a superclass of type parameters anyway.
by MarkovUnchained 8y ago
C++ 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.