[REBOL] Re: Rebol pickling recipes ?
From: dockimbel:free at: 6-Oct-2002 15:43
Hi Gabriele,
IIRC, Carl or Holger said once that words can exist in an unbounded
state so that means that there're not even bounded to the global
context.
Let's create an unbounded word :
>> z: first to-block "unbound-word"
== unbound-word
>> :z
== unbound-word
>> get z
** Script Error: unbound-word is not defined in this context
** Near: get z
This confirms that 'unbound-word is not bound to global context.
>> unbound-word: 1
== 1
>> get z
** Script Error: unbound-word is not defined in this context
** Near: get z
The version created with 'to-block at the global context level lives out
of contexts.
>> get x: to-word :z
== 1
>> get z
** Script Error: unbound-word is not defined in this context
** Near: get z
>> x
== unbound-word
>> get x
== 1
>> bind :z 'system
== unbound-word
>> get z
** Script Error: unbound-word is not defined in this context
** Near: get z
'to-word seems a good way to create a bounded word! from the unbounded
one, but i see no way to bound the former one to any context...
Now about the "curious behaviour", i guess that (first system/words) is
evaluated before (to-word "never-defined-this"), so you get the word
list before the new word is added to global context, that's why you get
'none the first time and get the word the second time.
>> z: to-word "never-defined-this9999" find first system/words z
== [never-defined-this9999]
Regards,
-DocKimbel.
Gabriele Santilli wrote:
[...]