[Haskell-cafe] Why aren't files flushed at exit?

Brandon Allbery allbery.b at gmail.com
Mon Jul 18 00:28:46 CEST 2011


On Sun, Jul 17, 2011 at 18:03, Jack Henahan <jhenahan at uvm.edu> wrote:
> Is there really no question? I question the assertion, for one. Just because a language allows a bad habit doesn't mean it's a feature. Leaving your handles open can lead to unpredictable results, which is somewhat anathema to the idea of correct programs, unless broken features are part of your spec.
>
> Out of curiosity, which languages `get this right', to your way of thinking?

It's not languages; it's system libraries.  And system libraries —
*not* the programs that use them — that don't clean up after
themselves are broken.  That kind of thing used to lead to lots of
resource leakage in older Windows, for example.

This is not to say that programs that rely on it are correct; it *is*
to say that, by the exact same reasoning, it is incorrect for runtime
libraries to assume that the *programs that use them* are correct.

-- 
brandon s allbery                                      allbery.b at gmail.com
wandering unix systems administrator (available)     (412) 475-9364 vm/sms



More information about the Haskell-Cafe mailing list