News for hackers. Stuff that matters.
Re:Rust as a gateway drug to Haskell by JoshTriplett on Wednesday June 14, 2017 @02:40AM (#14551020)
I had the same experience: I really enjoyed the expressiveness and power of Haskell, as well as the strong type system. But Rust gives me all those things, as well as iterators for laziness when desired, without the pervasive laziness that had me constantly chasing down space leaks and adding strictness annotations.
Re:Rust as a gateway drug to Haskell by vmchale on Wednesday June 14, 2017 @11:42AM (#14553534)
>But Rust gives me all those things, as well as iterators for laziness when desired, without the pervasive laziness that had me constantly chasing down space leaks

Well, yeah, Rust has manual memory management. Of course you don't get space leaks.

Anyways, Rust's laziness is not on par with Haskell. Iterators are great but it's not at all the same as e.g. GHC's lazy IO.

Re:Rust as a gateway drug to Haskell by JoshTriplett on Wednesday June 14, 2017 @12:43PM (#14553933)
> Well, yeah, Rust has manual memory management. Of course you don't get space leaks.

I wouldn't call Rust's memory management "manual". It's the only language I know of that I'd describe as having automatic memory management without garbage collection.

> Anyways, Rust's laziness is not on par with Haskell. Iterators are great but it's not at all the same as e.g. GHC's lazy IO.

Iterators, futures, and macros (for creating new language constructs) tend to provide the laziness I want. Beyond that, I've tended to find laziness as much a source of bugs as features. (Speaking from a perspective of having written and maintained large programs in Haskell, and in Rust.)