[Haskell-cafe] Re: Top Level <-

Ganesh Sittampalam ganesh at earth.li
Sun Sep 7 06:14:16 EDT 2008


On Sat, 6 Sep 2008, Brandon S. Allbery KF8NH wrote:

> On 2008 Sep 6, at 18:25, Ashley Yakeley wrote:
>> 
>> 2. If the dynamic loader loads an endless stream of different modules
>> containing initialisers, memory will thus leak.
>
> I think if the issue is this vs. not being able to guarantee any 
> once-only semantics, i consider the former necessary overhead for proper 
> program behavior.

Not leaking memory is an important part of proper program behaviour.

> And that, given that there exists extra-program global state that 
> one might want to access, once-only initialization is a necessity.

In what cases? In the case of buffered I/O there's no reason (in theory) 
you couldn't unload libc, do unbuffered I/O for a while, then reload libc 
and start again.

Ganesh


More information about the Haskell-Cafe mailing list