"Conal Elliott" <[EMAIL PROTECTED]> writes:

> I'm puzzled why explicit bracketing is seen as an acceptable solution.
> It seems to me that bracketing has the same drawbacks as explicit memory
> management, namely that it sometimes retains the resource (e.g., memory
> or file descriptor) longer than necessary (resource leak) and sometimes
> not long enough (potentially disastrous programmer error).

If used correctly, it will retain it about the right amount of time,
while with garbage collection it's *impossible* to ensure that it will
not be retained too long. Most GC schemes don't guarantee promptness
of collection.

It doesn't matter for pure memory, because GC will be performed as
soon as enough memory has been allocated, but it matters for other
resources, except for programs which don't open many files at all.

-- 
   __("<         Marcin Kowalczyk
   \__/       [EMAIL PROTECTED]
    ^^     http://qrnik.knm.org.pl/~qrczak/
_______________________________________________
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to