[plt-scheme] Space/time behaviour of Lazy Scheme

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Tue Oct 16 20:14:07 EDT 2007

On Oct 16, 2007, at 7:43 PM, John Clements wrote:

> On Oct 16, 2007, at 3:16 PM, jerzy.karczmarczuk at info.unicaen.fr wrote:
>> Eli Barzilay writes /a propos/ the Lazy Scheme bug
>>> OK, that's fixed.  If you want to patch it up to use it, look for  
>>> this
>>> line
>>>                 [(promise? p) (loop p)] ; hide sharing in  
>>> "collects/lazy/promise.ss", and change it to
>>>                 [(promise? p) (loop (p:ref p))] ; hide sharing
>> Indeed, it works. At least this endless loop is no more. Thanks.
>> A question, just for my general culture...
>> Since, by design, there are no global replacements of once-evaluated
>> promises by their results, somehow in my head I have - despite  
>> what you say
>> - that the difference between lazy Scheme and, say, Haskell or  
>> Clean is
>> still very profound, and an attempt to make a truly lazy Scheme would
>> demand changing the compiler. Am I wrong?
> I think that you're more-or-less-wrong, in the following sense:  in  
> haskell, an unevaluated value is replaced by an evaluated one.  In  
> lazy scheme, an unevaluated value (#<promise: *unevaluated*>) is  
> replaced by an evaluated one (#<promise : 7>).  Are you concerned  
> about the way the value printer works?  Or about the extra memory  
> taken by the promise?
> Put differently: I think that the kind of difference you're talking  
> about is largely equivalent to, say, an unboxing optimization that  
> shrinks the representation of certain values in certain programs.   
> In other words, not something that changes the meaning of a language.

Can we rephrase this as:

  why has Eli not reworked the printer yet?
  or the Lazy stepper so that people can see what is going on?

-- Matthias

Posted on the users mailing list.