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

2008-11-24 Thread John Meacham
A way this analogy breaks down is that lazyness evaluates precisely what is needed, and no more. The set of values evaluated by lazyness is exactly equivalent to the set of values needed. Garbage collectors are conservative by nature, the values collected by the garbage collector are some subset

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

2008-11-23 Thread Robin Green
It occurs to me that garbage collection can be seen as some kind of dual of laziness. Laziness means deferring the creation of values until later in the future (or even never). Garbage collection means eagerly destroying data created in the past, and reclaiming the memory used by it, before some

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

2008-11-23 Thread Colin Paul Adams
Robin == Robin Green [EMAIL PROTECTED] 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

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

2008-11-23 Thread Bernie Pope
On 23/11/2008, at 9:18 PM, Robin Green wrote: It occurs to me that garbage collection can be seen as some kind of dual of laziness. Laziness means deferring the creation of values until later in the future (or even never). A program optimisation might also have the same effect (of