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:
- Greg Young's CQRS, Domain Events, Event Sourcing and how to apply DDD (in London on 9th - 11th June 2015)
- DDD eXchange 2015 (in London on 12th June 2015)
- When Men were Men, Computers were Computers, and Women were Programmers (in London on 24th June 2015)
- Conway's Law & Reverse Conway's Law - How to avoid being caught by it and how to turn it to your advantage (in London on 13th July 2015)
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