[Haskell-cafe] Garbage collection as a dual of laziness?

Colin Paul Adams colin at colina.demon.co.uk
Sun Nov 23 15:45:41 EST 2008


>>>>> "Robin" == Robin Green <greenrd at greenrd.org> writes:

    Robin> It occurs to me that garbage collection can be seen as some
    Robin> kind of dual of laziness. Laziness means deferring the
    Robin> creation of values until later in the future (or even
    Robin> never). Garbage collection means eagerly destroying data
    Robin> created in the past, and reclaiming the memory used by it,
    Robin> before some other event which would do so

I think of garbage collection in the opposite way - that the
programmer doesn't free the memory as soon it is known to be safe to
do so, but leaves the job to a garbage collector, which may not get
round to it for quite some time (perhaps not until program
termination, even).
-- 
Colin Adams
Preston Lancashire


More information about the Haskell-Cafe mailing list