News for hackers. Stuff that matters.
Re:Rust web framework, Iron by tinco on Monday August 17, 2015 @06:03AM (#10072122)
As a Haskell programmer I feel this isn't exactly true. Haskell's garbage collector and referential transparency make immutability not really an issue. Impure code is simply of a different type, so it's easy to avoid. What makes dealing with the borrow check hard is that it triggers on code that intuitively is correct, it can be hard to envision why it's not. I feel Haskell does a better job at diverting you from incorrect code.

That said, dealing the borrow checker is just a skill. You take out a few hours to learn to deal with it, and then you just can. As you said it's super powerful and definitely your ally, so saying its a downside of Rust is silliness.

Re:Rust web framework, Iron by pcwalton on Monday August 17, 2015 @01:36PM (#10074709)
> What makes dealing with the borrow check hard is that it triggers on code that intuitively is correct, it can be hard to envision why it's not.

Because it's more expressive than just forbidding mutability. You could program in Rust the same way you program in Haskell, by encapsulating mutability in functions with different types (&mut). Then the flow sensitivity and other issues would never bother you.

Rust's flow-based control of mutability is strictly more expressive than the monad system of Haskell. If you don't like that expressivity, don't use it.