News for hackers. Stuff that matters.
Re:Rust for functional programmers by dbpatterson on Sunday July 13, 2014 @12:03PM (#8027710)
Also, unless things have changed significantly in the past year or so (since I've last really used Rust), there are significant differences between Rust traits and Haskell type classes. You can have collections of heterogeneous types that all share the same trait, which is not true with type classes. Most descriptions I've seen say that they are more of a hybrid of Java interfaces and Haskell type classes.
Re:Rust for functional programmers by gliptic on Sunday July 13, 2014 @12:11PM (#8027747)
You can have the same thing in Haskell using existential types.
Re:Rust for functional programmers by platz on Sunday July 13, 2014 @12:52PM (#8027880)
I think the point is that traits are different from typeclasses
Re:Rust for functional programmers by cmrx64 on Sunday July 13, 2014 @02:52PM (#8028264)
Not really, since the equivalent formulations in Rust are also existentials, just slightly massaged syntax-wise.