News for hackers. Stuff that matters.
Re:Monads and GATs in Nightly Rust by steveklabnik on Friday December 11, 2020 @11:34AM (#25387583)
The core issue here isn't exactly GC, though it is related. The issue is that abstraction is about hiding things, and Rust's type machinery is about exposing things. In Haskell, you have lambdas, and you have types of all of the same size data, because it's all on the heap. In Rust, each closure is a distinct type, plus the three different types of closures, plus types of different sizes...

It's not so much the GC, as it is "in a GC'd language, everything is on the heap and a lot of information (from Rust's perspective) is erased." You may be able to get rid of GC in some sense, but you'd end up with something halfway to Rust, not the whole way.

Re:Monads and GATs in Nightly Rust by lambda_obrien on Friday December 11, 2020 @02:39PM (#25389880)
> Rust's type machinery is about exposing things

That makes sense, thanks for explaining that, I am used to Haskell but never used Rust.

Re:Monads and GATs in Nightly Rust by steveklabnik on Friday December 11, 2020 @02:59PM (#25390171)
No problem. I mean, in some sense, it's also about abstracting things, it's just that Rust cares about a lot more details than other languages, and those get reflected in type signatures.