3 ms·
GP is referring to a Rust language feature called “traits” that is a quirky subset of a Haskell language feature called “type classes”. Type classes are based
by benreesman 5y ago
GP is referring to a Rust language feature called “traits” that is a quirky subset of a Haskell language feature called “type classes”.
Type classes are based on firmer theoretical footing (I think the original paper is called “Making Ad-Hoc Polymorphism Less Ad-Hoc”) and therefore run into fewer weird corner cases.
That’s not to say that Rust traits are “bad”, they’re useful and arguably cleaner than the C++ version of the idea (“concepts”), but a Haskell hacker writing Rust is liable to grumble now and again at the weird edge cases.