develooper Front page | perl.perl6.language | Postings from March 2005

Re: Dynamically Scoped Dynamic Scopes

Thread Previous
From:
Larry Wall
Date:
March 1, 2005 17:39
Subject:
Re: Dynamically Scoped Dynamic Scopes
Message ID:
20050302013850.GA7974@wall.org
On Sun, Feb 27, 2005 at 10:52:58AM -0800, Dave Whipp wrote:
: One could imagine implementing this by creating the scopes as instances 
: of an object, and then binding the object's attributes onto the 
: variables (i.e. "our $foo := $obj.bar"). The "scope space" object would 
: then be the set of global vaiables to be bound; and the "scope" object 
: would be the set of values to bind.
: 
: However, when we want to release the global vaiables from our scope, 
: then we need a way to unbind the variables, and restore them to the 
: bindings that existed before they were bound to our scope space. I'm not 
: sure how to do that, because we don't have any builtin concept of 
: dynamically scoped scopes.

Hmm.  Just sounds to me like a form of tying involving delegation.
Piece o' cake.  Syntax left for the module author to decide, if a
special declarator is needed in preference to standard variable-type
syntax.

Larry

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About