3 ms·
You don’t need that powerful of a type system to do this kind of thing; Rust is still pretty far behind Haskell in terms of raw power.
by steveklabnik 8y ago
You don’t need that powerful of a type system to do this kind of thing; Rust is still pretty far behind Haskell in terms of raw power.
- rienbdj 8y agoIndeed. Seen similar in C++
- emn13 8y agoI don't think it's helpful to talk about "raw power" in a comparison like this; clearly there are significant type system features Haskell lacks - so this isn't a question of a simple superset. And in any case; what does raw power really mean? The two languages appear to have fairly widely different aims, and both see type-system cleverness as a boon, so it should come as little surprise that they don't all have the same tricks.
- steveklabnik 8y agoThere’s only one type system feature that Rust has that Haskell doesn’t, and Haskell will have it soon. Yet there are many features that Haskell has that Rust does not, and Rust is not getting that stuff any time soon. That’s what I mean by raw power; it is very close to a subset relationship.
- emn13 8y agoDidn't know about https://ghc.haskell.org/trac/ghc/wiki/LinearTypes https://ghc.haskell.org/trac/ghc/wiki/LinearTypes until now; I'm assuming you're referring to that? Neat!