On Wed, Aug 3, 2011 at 7:24 PM, BGB <cr88...@gmail.com> wrote:
>
> If you have dynamic scope, you do not need TLS.
>
>
> some people could potentially get annoyed or complain about having to
> re-declare their thread-local dynamic variables when spawning a thread.
>

The new thread should inherit the entire dynamic scope - logically, a local
copy thereof. If there are object references mixed in, then the new thread
now has a copy of these references, but the reference variables initially
point to shared objects.

Most of my earlier language designs (until late 2007) used a variation of
dynamic scope <http://c2.com/cgi/wiki?ExplicitManagementOfImplicitContext> I
developed in the context of distributed systems. I eventually eliminated it
for two reasons:
(1) Secure Interaction Design<http://people.ischool.berkeley.edu/~ping/sid/>.
Dynamic scope violates the *path of least resistance, visibility, *and*awareness
* properties. A lot of authority gets hidden inside the dynamic scope -
hidden from both the sender and the potential user.
(2) Many optimizations (memoization, caching, multi-cast and
content-distribution, stable partial-evaluation and specialization),
especially across module or distribution boundaries, are difficult unless we
know exactly which parts of the input might influence the response.

Today, I only allow explicit scope. Developers may explicitly model implicit
context when they want it, similar to State monad in Haskell.

Regards,

Dave
_______________________________________________
fonc mailing list
fonc@vpri.org
http://vpri.org/mailman/listinfo/fonc

Reply via email to