[EMAIL PROTECTED] wrote:
> Why does REBOL have variables be globally scoped by default? I ran into this
Because REBOL does not have something like a "scope". Notice that
there are no variables at all, only values.
Some of these values, called "words", have the ability to refer to
other values. A word is made to refer to a value with the function
BIND. That function looks up the values in tables of words and
associated values, called "contexts". When REBOL loads a block, it
is automatically bound to the global context (system/words); the
binding to other contexts is done "manually" at run-time. FUNC
automatically binds the body block to the function's context.
A context is not a scope. Each word has a reference to its value,
and so to its context. A context is NOT associated to a block.
HTH,
Gabriele.
--
Gabriele Santilli <[EMAIL PROTECTED]> - Amigan - REBOL programmer
Amiga Group Italia sez. L'Aquila -- http://www.amyresource.it/AGI/