John Cowan <cowan_at_ccil.org> writes:
> Michael Sperber scripsit:
>
>> Nice try! However, parameters are neither simple nor general.
>> Moreover, the particular design you chose is problematic because it
>> destroys modularity. In contrast, dynamic binding as a separate
>> mechanism is simple and modular. Combined with thread-local storage
>> (less simple and not modular, but still simpler than parameters), you
>> can build parameters.
>
> Nice try. But thread-local storage requires threads, which are out of
> scope for R6RS.
Exactly. :-)
However, we have regular storage, so all the semantics you need in the
absense of threads can be explained in terms of that.
> Can you give an example of the kind of dynamic binding you mean?
You just leave mutation out of the API, and all mention in the spec
that dynamic variables are bound to some kind of storage location.
Instead, dynamic binding binds dynamic variables to the values
specified in the binding form.
Then it's trivial to hook up continuations and dynamic variables: A
continuation just captures the dynamic environment, i.e. the values of
the dynamic variables. (This doesn't even have to involve any
copying, if deep binding is used as an implementation strategy.)
--
Cheers =8-} Mike
Friede, V?lkerverst?ndigung und ?berhaupt blabla
Received on Wed Feb 21 2007 - 01:54:28 UTC