[Haskell-cafe] Re: Top Level <-
Ganesh Sittampalam
ganesh at earth.li
Sun Sep 7 12:10:40 EDT 2008
On Sun, 7 Sep 2008, Brandon S. Allbery KF8NH wrote:
>> plug-in that is reloaded in different forms again and again. And I see
>> module K which does something I want, so I use it. It so happens that K
>> uses M, which has a <-. If I knew that using K in my plug-in would cause a
>> memory leak, I would avoid doing so; but since the whole point of <- is to
>> avoid making the need for some state visible in the API.
>
> False, as it's in ACIO and therefore advertises that it will "leak
> memory" in the name of correct behavior.
I thought ACIO was a restriction on the thing on the right hand side of
the <-? How does the module itself advertise its use of this
(transitively) to users?
> Since you consider memory leaks to be worse than correct behavior,
Not leaking memory is *part* of correct behaviour. If <- is to be created
at all, it should be created with restrictions that make it capable of
guaranteeing correct behaviour.
> (But you might want to go look at that list of modules which do global
> variable initialization and therefore aren't entirely trustworthy unless
> something like ACIO exists.)
We should fix them (and their interface) so this doesn't happen, rather
than standardising something broken.
Ganesh
More information about the Haskell-Cafe
mailing list