Phil Dawes wrote:

> Having just read this again, I'd be inclined to use a local namespaced
> variable rather than a global one just because it might be used across
> threads. If that's the case, doesn't VAR:s boil down to the same thing?

Hi Phil,

There's no distinction between "global" and "local" variables. We have a 
namestack which is a stack of namespaces. The only thing that's special 
about 'set-global' instead of 'set' is that it jumps to the first namespace 
and sets the variable value there instead of the last namespace. The last 
namespace is the "top" of the namestack; i.e. the most immediate. So when you 
do 'set-global' it isn't promoting the variable to any special status or 
anything like that. The 'set' word operates on the most immediate namespace. 
The 'set*' word searches the namestack until it finds a binding and sets it 
there. 'set*' is the closest to 'set!' in a Scheme implementation.

Ed

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to