[Haskell-cafe] unsafeInterleaveST (and IO) is really unsafe [was: meaning of "referential transparency"]
cdsmith at gmail.com
Fri Apr 12 17:44:32 CEST 2013
On Fri, Apr 12, 2013 at 1:44 AM, <oleg at okmij.org> wrote:
> As to alternatives -- this is may be the issue of
> familiarity or the availability of a nice library of combinators.
It is certainly not just a matter of familiarity, nor availability.
Rather, it's a matter of the number of names that are required in a
working set. Any Haskell programmer, regardless of whether they use
lazy I/O, will already know the meanings of (.), length, and filter.
On the other hand, (>$<), count_i, and filterL are new names that must
be learned from yet another library -- and much harder than learned,
also kept in a mental working set of fluency.
This ends up being a rather strong argument for lazy I/O. Not that
the code is shorter, but that it (surprisingly) unifies ideas that
would otherwise have required separate vocabulary.
I'm not saying it's a sufficient argument, just that it's a much
stronger one than familiarity, and that it's untrue that some better
library might achieve the same thing without the negative
consequences. (If you're curious, I do believe that it often is a
sufficient argument in certain environments; I just don't think that's
the kind of question that gets resolved in mailing list threads.)
More information about the Haskell-Cafe