[squeak-dev] Lazy evaluation?

Frank Shearar frank.shearar at gmail.com
Sat Jul 9 17:29:12 UTC 2011


That paper will mention the basic technique of lazy evaluation in a
strict language, which is just wrapping an expression up in a block:

    [self myExpression: param and: thatParam]

Now you can pass that block - thunk - around, and evaluate it only
when required.

Watch in that paper how the tail of a list is a block that, when
evaluated, yields another element in the list... and leaves the thunk
as the tail.

frank

On 9 July 2011 17:41, Jeff G <jgon.in.canada at gmail.com> wrote:
> Hi Casey,
>
> I would give an initial pointer to this article on the VPRI website, which
> apparently even has an implementation:
> http://www.vpri.org/pdf/m2009006_lazylist.pdf
>
> It may betray a misunderstanding of lazy evalutation on my part, but the
> chapter on streams in SICP might also provide some interesting reading.
>
> I hope that this is helpful to you,
> Jeff G.
>
>
>
>



More information about the Squeak-dev mailing list