Hacker News new | past | comments | ask | show | jobs | submit login

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.




> Rust's type machinery is about exposing things

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


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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: