Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat makes Iteratees worth the complexity?
    text
    copied!<p>First, I understand the <em>how</em> of iteratees, well enough that I could probably write a simplistic and buggy implementation without referring back to any existing ones.</p> <p>What I'd really like to know is <em>why</em> people seem to find them so fascinating, or under what circumstances their benefits justify their complexity. Comparing them to lazy I/O there is a very clear benefit, but that seems an awful lot like a straw man to me. I never felt comfortable about lazy I/O in the first place, and I avoid it except for the occasional <code>hGetContents</code> or <code>readFile</code>, mostly in very simple programs.</p> <p>In real-world scenarios I generally use traditional I/O interfaces with control abstractions appropriate to the task. In that context I just don't see the benefit of iteratees, or to what task they are an appropriate control abstraction. Most of the time they seem more like unnecessary complexity or even a counterproductive inversion of control.</p> <p>I've read a fair number of articles about them and sources that make use of them, but have not yet found a compelling example that actually made me think anything along the lines of "oh, yea, I'd have used them there too." Maybe I just haven't read the right ones. Or perhaps there is a yet-to-be-devised interface, simpler than any I've yet seen, that would make them feel less like a Swiss Army Chainsaw.</p> <p>Am I just suffering from not-invented-here syndrome or is my unease well-founded? Or is it perhaps something else entirely?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload