3 ms·
Lazy evaluation is what drew me into Haskell a few years ago, when someone showed me how you could use it to beautifully read a file as if it were in-memory, bu
by tombert 11y ago
Lazy evaluation is what drew me into Haskell a few years ago, when someone showed me how you could use it to beautifully read a file as if it were in-memory, but done entirely as a stream. I thought that was amazing and I was sold.
- lumpypua 11y agoIt's pretty, but lazy IO is evil: https://www.reddit.com/r/haskell/comments/1e8k3k/three_examples_of_problems_with_lazy_io/c9xyxxy https://www.reddit.com/r/haskell/comments/1e8k3k/three_examp...
- tombert 11y agoI should have mentioned that in my initial comment; Lazy IO is beautiful and OK for a simple application, but it's smarter to use a streaming library like Pipes of Conduit for anything big.