Comparing the three styles of I/O
Let's compare the 3 styles of I/O we have encountered from a few perspectives:
Handle-based I/O |
Lazy I/O |
Iteratee I/O | |
---|---|---|---|
Processing |
Strict and incremental |
Lazy |
Strict and incremental |
What drives evaluation? |
Looping code |
Stream consumer |
Enumerator + Iterator |
Level of abstraction |
Low level |
High level |
High level |
Resource management, dealing with Exceptions |
Precise control |
No precise control |
Precise control |
Get Haskell Design Patterns now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.