[Haskell-cafe] Re: Top Level <-

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Sat Sep 6 18:31:03 EDT 2008


On 2008 Sep 6, at 18:25, Ashley Yakeley wrote:
> 1. Results from initialisers cannot be GC'd even if they become
> otherwise unreachable, because the dynamic loader might re-load the
> module (and then we'd need those original results).
>
> 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.  And that, given that there exists extra-program  
global state that one might want to access, once-only initialization  
is a necessity.  (Whoever it was who jumped off this point to say  
Haskell should exit the real world misses the point:  it's not even  
all that useful from a theoretical standpoint if it's not allowed to  
interact with anything outside itself, and stdin/stdout tend to  
require once-only initialization.  You can't really hide from it.)

-- 
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH




More information about the Haskell-Cafe mailing list