Conversation

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.
2
60
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
39
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
30
Yeah, I've been thinking on this, and am curious to explore other options. Perhaps not in Rust though. You might need to do compositions and mapping and stuff in a category of 'iterator adaptors' rather than on the container itself.
1
Not sure how well the theory works out though, I'm not a category theory expert. Also you might need a more general Functor interface than the one that Haskell traditionally provides.
1