Haskell is one of the few programming languages that use lazy evaluation: computations get performed only when their result is demanded. It is however not so straightforward to combine lazy evaluation with side effects, such as reading from a file.
Lazy I/O is the standard solution to this in the current base libraries, but has its problems. We explain how lazy I/O works, what the problems are, and explore some of the solutions that are being proposed at the moment: iteratees, pipes, stream I/O, etc.
YOU MAY ALSO LIKE:
- Masterclass: Reducing Technical Debt with Michael C. Feathers (in London on 21st - 22nd August 2017)
- Uncle Bob's Advanced TDD (in London on 30th - 31st October 2017)
- Uncle Bob's Clean Code: Agile Software Craftsmanship (in London on 1st - 3rd November 2017)
- µCon 2017: The Microservices Conference (in London on 6th - 7th November 2017)
Lazy I/O and Alternatives in Haskell
Edsko joined Well-Typed as a Haskell Consultant in 2012. He is one of the primary authors of Cloud Haskell and has recently been working on Haskell language infrastructure.Edsko has been using Haskell since 2004, and holds a PhD in substructural type