On the one hand, I have many legitimate use cases for higher kinded types in Rust and I hope they land soon.
On the other, I'm extremely worried about how they would affect the Rust ecosystem once everyone starts trying to implement Haskell style category theory libraries.
Conversation
I think the hardest lesson I've learned over the past year and a half of Rust development is that "this is good in Haskell" rarely implies "this is good in Rust," despite the surface similarities between the languages.
Not sure everyone would learn that lesson in time...
4
6
39
I mean, re: mobile.twitter.com/bodil/status/1 - that was a joke and I actually took lenses _out_ of immutable.rs because in the end I couldn't see the point of them, where the use case in Haskell (and Clojure) is obvious.
Quote Tweet
1
1
15
On the other hand, I really do think Rust would benefit greatly from a simple Monad interface so we could have fully generalised do notation instead of this async/await silliness.
6
3
30
I dunno, I think I'd rather a zero-cost version of an effect system (if that is possible). But I think that ship has very much sailed :(
1
had some proposals to that (kuhumm) effect. I think the biggest part of the issue here is that nobody has done this _before_ and the "no new research" principle. (Which the name "Rust" may or may not bear some relation to.)
1
1
(Also like Graydon's story about why Rust ended up with type classes (paraphrasing from memory): there were people on the team who knew how to implement type classes, there weren't people on the team who knew how to implement the latest fancy module systems research.)
2
1
Yeah, that's a good point. I guess the trouble with how type classes and async have settled is that they might be obstacles to evolving toward module systems and algebraic effects respectively (once they get better understood). But I far prefer having something, and shipping. 👏
Language design is a super hard challenge, especially with the demands of a growing ecosystem. Going with a more well-understood sync model with some nice improvements (ie. the zero-cost stuff) was a decent compromise.
1


