[Haskell-cafe] Fwd: Default stdout buffering of child processofcreateProcess
donn at avvanta.com
Mon Aug 4 04:25:45 UTC 2014
quoth Elliot Robinson <elliot.robinson at argiopetech.com>,
> As a platform-specific optimization, this makes total sense. Most of the
> people who need this optimization know they need it. My fear is that
> offering "handles are for buffered I/O" (and statements like it) as general
> case rules leads to the "I'm new to <field> and I'm using System.Posix.IO
> for unbuffered IO because Handles aren't good for that, and now my program
> doesn't compile on <non-Posix OS>" ilk of Haskell-Cafe/SO questions.
Your fears are misplaced. No one is going to do that, ever. Please
bear in mind that we're talking about a Posix Fd produced by another
Posix terminal function. That is where you will see one programmer
after another feed this Fd into a Handle, under the mistaken impression
that it's the only legit way to do I/O on it in Haskell, and then have
various problems that we're talking about. When it's for buffered I/O,
then it makes sense, otherwise it's probably an error.
To address J.K.'s (lest I misspell) probably ironic question seriously,
why I certainly say Haskell should strive to be as compatible as possible
with ANSI C, whatever Mr. Allbery may think. Gratuitous difference in
functionality that's clearly based on C I/O would benefit no one.
More information about the Haskell-Cafe