Hello [EMAIL PROTECTED]!

On 25-Dic-99, you wrote:

 j> Privately, I think of the set-word as a distinct entity which
 j> refers to its own word (something similar to the diagram
 j> below) but until I can experiment a bit more (or the REBOL
 j> gurus give us a peek into the magic cave!) I want to hold off
 j> committing too far. 

My model for binding/contexts is the following:

    {{context! * *}}
     ^         | `---------> <<... 1 ...>> ; values (simplified notation)
      \        |
       \       `-----------> <<... a ...>> ; words (simplified notation)
        \
         \
{{word! * *}}
        |
        V
        << #"a" >>

I pictured a context as a table with two columns, one for words
and one for values. This is mainly because objects (that are
can be seen as no more than contexts) present themselves in that
way:

>> obj: make object! [
[    a: 1
[    b: 2
[    ]
>> first obj
== [self a b]
>> second obj
== [
    make object! [
        a: 1
        b: 2
    ] 1 2]

So, every word simply mantains a reference to a context (and
probably, for efficiency, directly to its value in that context
--- this could be proven in the previous version of REBOL), and
all the functions that modify the binding of a word simply change
that reference.

This has allowed me to explain almost every case I encountered in
REBOL so far; I hope it can be useful. I don't know how much
accurate it is.

Regards,
    Gabriele.
-- 
o--------------------) .-^-. (----------------------------------o
| Gabriele Santilli / /_/_\_\ \ Amiga Group Italia --- L'Aquila |
| GIESSE on IRC     \ \-\_/-/ /  http://www.amyresource.it/AGI/ |
o--------------------) `-v-' (----------------------------------o

Reply via email to