John said:
Ok, here is what's at the top of my REBOL wish list:
1. Documentation of the scoping model.
... (rest snipped)
I think, there is a help for you with that one...
By scope rules are meant the rules the Rebol interpreter follows to resolve
the word's binding.
The simplest but true answer is - there is only one scope rule in Rebol:
*When the interpreter has to resolve the binding of a word, it simply looks
at it's binding attribute.*
So the scoping in Rebol is just a *side effect* of the behaviour of these:
WORD! datatype implementation, context implementation, BIND, LOAD, USE, MAKE
FUNCTION!, MAKE OBJECT!
Briefly speaking if you find out, how these work, you have got all the
documentation that is relevant.
More thoroughly it can be described as follows:
1) every word (e.g. 'AHOY) has got two attributes:
a) it's printable form - i.e. the string "AHOY"
b) it's binding.
Binding is a reference to a context.
2) The context is a data structure containing the list of the context words
together with a list of their values in that context.
3) When the interpreter LOAD's any Rebol code, it BINDs every word to the
global context.
4) When the USE WORDS BLOCK is invoked, it creates a new context containing
WORDS, for each of which it uses the UNSET! value.
As the next step it BINDs BLOCK to that context. That means, that the
bindings of all words in the BLOCK are changed to the new context, if the
words are the words of the new context and left unchanged otherwise. The
next step is to DO the result of BIND BLOCK...
5) This is just an illustration, to fully understand the picture, one must
know how the MAKE FUNCTION! and the MAKE OBJECT! work
Hope this helps
Ladislav
(btw - What do you mean by commands? - I do not see any such beast in Rebol,
everything is just an - possibly side effect generating - expression.)