2 ms·
I agree that the lower-level details of Rust and the original vision for it was not super close to Haskell, but having said that, I think it often attracts a lo
by saghm 4y ago
I agree that the lower-level details of Rust and the original vision for it was not super close to Haskell, but having said that, I think it often attracts a lot of the same people. Rust traits are very similar to Haskell's typeclasses, and stuff like the Iterator API and the fact that mutability is a first-class concept in the language (and therefore easy to keep track of if you want to avoid it) make it pretty well-suited to functional programming. Add that to the fact that developer productivity is valued pretty highly, which is why there's such a focus on good tooling e.g. cargo, compiler errors, and you end up with a language that does a surprisingly good impression of "Haskell but more user friendly". There's a bunch of other stuff too, like the ability to "drop down" into imperative programming, and the fact that you can use references and stuff to avoid allocations, but if you want to just take everything by value and clone everything without using `Arc` or `Rc` and go pure functional, Rust isn't going to get much in your way.