[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Y Store /Closures




Steve Dekorte <steve@dekorte.com> writes:

> A bigger problem would seem to be that all objects
> referenced by the stack would also have to be bottled up which might
> be a lot of data.

According to the paper the objects referred to by the continuation get
stored in a cookie, which is important because the state needs to be
*shared* between all the continuations. This strategy, the paper
explains, imposes state size limitations due to browser limitations on
cookie size.

Robby, nice paper btw. I spotted one minor bug: Scheme evaluation order
is unspecified, which is something that needs to be taken into account
when transforming non-interactive programs into interactive ones. So the
code from your example

(display
  (+ (prompt-read "Enter the first number to add:")
     (prompt-read "Enter the second number to add:")))

should instead be

(display
  (let* ((arg1 (prompt-read "Enter the first number to add:"))
         (arg2 (prompt-read "Enter the second number to add:")))
    (+ arg1 arg2)))


Matthias.