|
|
|
|
|
by nrioux
1277 days ago
|
|
Phil Wadler, the first author of the paper you cite, was literally a principal designer of Haskell. SML does not have type classes; your quote points out a deficiency in SML that motivates type classes. My understanding is that "trait" is an unfortunately overloaded term. Traits in Rust are much more closely related to Haskell's type classes than to traits in the OOP sense. |
|
Yes, I know that. That's the point.
> SML does not have type classes; your quote points out a deficiency in SML that motivates type classes.
Again, that's the point. It's what "have an influence" means in that it was SML that influenced or inspired Haskell's type classes. And it's part of my overall point of SML being rather influential, although quietly.
> Traits in Rust are much more closely related to Haskell's type classes than to traits in the OOP sense.
I'm not so sure about that from what I have read. But I don't have enough information other than to just point to things I have read.
https://stackoverflow.com/questions/28123453/what-is-the-dif...
While I can't find any concrete information, I would be quite surprised if Rust's traits were influenced by type classes rather than the more OOP interpretation of traits (in the design space of traits vs mixins vs interfaces).
https://doc.rust-lang.org/book/ch17-01-what-is-oo.html