[Haskell-cafe] Are handles garbage-collected?

Sam Mason mason at f2s.com
Tue Oct 26 06:28:09 EDT 2004

Marcin 'Qrczak' Kowalczyk wrote:
>I would not be surprised if relying on GC to close open files would
>be generally considered kosher in a few years - in cases when it has
>little visible effects outside, i.e. excluding network connections,
>but including reading configuration files.

The best idea I've seen is another one from Microsoft Research.
It's an extension to C that allows the the programmer to use the
type system to specify the lifetime of things.  Seems like a pretty
good idea:


Not sure how you'd do something like that in Haskell though!


More information about the Haskell-Cafe mailing list