[plt-scheme] v4 questions

From: Mark Engelberg (mark.engelberg at gmail.com)
Date: Sun Mar 30 22:26:21 EDT 2008

On Sun, Mar 30, 2008 at 2:18 PM, Eli Barzilay <eli at barzilay.org> wrote:
>  > What about integration with the reader?
>  Same here.  (But a reader syntax is not too useful since it means that
>  you could have used plain lists.)

Sorry, what I meant was more of an integration with the way streams
are displayed in the evaluation window.  For example, numbers have a
lot of close integration, where you can right-click on a number and
view the number in various ways.  Similarly, I'd like to be able to
right-click on a stream and choose various options, such as seeing the
already-forced portion of the stream, or choosing a fixed number of
items to force and show (such as the first 100 items followed by a

>  My experience is that there are way too many options to have a clear
>  choice here -- and my personal preference for dealing with it is to
>  just bite all the way through and go with a lazy language, instead of
>  the stream half-baked approach.

Is Lazy Scheme going to fill that niche?  Last time I played around
with Lazy Scheme, it didn't interact very well with large chunks of
the Scheme libraries.  For me, I find that in order to avoid
iteration, I sometimes need:
1.  A stream/iterator/generator that looks and acts like an infinite
list, but recomputes its values every time.
2.  A stream/lazy list that looks and acts like an infinite list, but
only computes its values the first time and then caches them.
3.  A lazy keyword that acts like a delay with an auto-force upon evaluation.

The first two can probably be done to some extent in libraries.  I
doubt the third one can be.  But these features seem sufficient to me,
and by picking and choosing where to apply those techiques, I don't
end up with programs whose space performance is as inscrutable as in,
say Haskell.  The designers of Scala and F# probably have similar
tastes to me in this regard, because these forms of laziness are
offered by those languages.

So I'll say that streams and other easy forms of laziness are still
high on my wish list for PLT Scheme.  Maybe you're right that much of
this can be done in libraries, but I suspect it won't be quite as


Posted on the users mailing list.