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

RE: what is the problem?

In SmallScript/Smalltalk:

    Class name: Foo
        shared-fields: tls aVarName.

The "tls" or equivalent "thread" annotation, declares the variable as
being thread-local. 

Using other features, such as "virtual properties", or "managed-objects
w/read-write barriers" you can create any type of "active-variable"
based on state within an execution context.

And since all operations (other than assignment of local/inst-vars) are
performed with messages you can define those any way you like.
Assignment interception requires the object-model (MOP) feature for
turning on read and/or write barrier for a given object [which then
delegates to the objects manager, which defaults to the object itself,
which defaults to its class, which defaults to allowing normal
read/write as inherited from Object].

-- Dave S. [SmallScript LLC]

SmallScript for the AOS & .NET Platforms
David.Simmons@SmallScript.com | http://www.smallscript.org

> -----Original Message-----
> From: owner-ll1-discuss@ai.mit.edu
> On Behalf Of Scott McKay
> Sent: Tuesday, December 18, 2001 2:02 PM
> To: Paul Graham
> Cc: jeremy@zope.com; Paul Prescod; ll1-discuss@ai.mit.edu
> Subject: Re: what is the problem?
> At 04:58 PM 12/18/01, Paul Graham wrote:
> >Ah, ok, what I really meant was that it didn't have the
> >lexical scope one would associated with Lisp today.
> >
> >Do you mean you couldn't rebind (rebind, not reset)
> >globals?
> >
> >Maybe this would be a good group to ask this question:
> >is there any use for local, dynamic variables?  The
> >only time I've ever used dynamic scope is to rebind
> >globals like *print-base* or *standard-output*.
> It strikes me that transparent support for dynamic thread-local
> variables is a more useful thing.
> In FunO Dylan, there's 'define thread variable' to define such a
> variable, and you can use 'dynamic-bind' to bind the variable
> to a new value, visible only within that thread.