[r6rs-discuss] [Formal] SRFI-39 should be made an R6RS library

From: R. Kent Dybvig <dyb>
Date: Mon Feb 12 18:51:46 2007

> No, I'm suggesting that one should dynamically bind *values*, not
> locations, and do the locations mechanism orthogonally to that.
> Again, the details are all in the paper.

While the mechanism your paper describes may be useful, dynamic binding of
per-thread locations has also proven to be useful in practice, and the
interaction with threads and continuations has not proven to be
problematic (or worse). In any case, if you provide per-thread locations,
I predict that programmers will want to dynamically bind them.

> ... and how exactly is it defined? Does the contents of the location
> migrate with the continuation? I'm assuming no, from your
> description. However, it's often desirable (if mutation isn't
> involved) for the value of a dynamic binding to migrate. So, I'm sure
> the semantics is well defined, but it's often not the one I want. I'd
> rather mix and match, which for me typically means not doing mutation
> anyway.

When the continuation is invoked, any dynamic bindings of the new
continuation are restored (to the invoking thread's locations), just as
when any continuation is invoked. I believe this is indistinguishable
from the semantics you want if no explicit mutation is involved.

Kent
Received on Mon Feb 12 2007 - 18:51:12 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:01 UTC