[REBOL] Re: Rebol pickling recipes ?
From: laurent:giroud:libertysurf at: 4-Oct-2002 23:03
> << After a few days with Python I am wondering how to 'pickle' Rebol
> I guess that depends on exactly what your needs are. With REBOL, you have a
> number of options. You can MOLD objects and then write them out, you can
> write out just the spec block for them, you can serialize things out as
> blocks - or any data really - even if they aren't objects. This is one of
> those things that is so simple in REBOL, it makes you forget how hard it is
> in other languages (i.e. that they have to provide serialization mechanisms
> which were probably a lot of work for them to write :). The great benefit of
> code/data duality shines bright.
> SAVE and MOLD both have an /ALL refinement now which creates a "true"
> serialized format.
One recent thread on the list insisted on the fact that nothing in rebol can be
evaluated correctly outside of its original context (if I understood correctly).
So reading your answer I wonder if this applies to objects printed with 'mold ?
Is it possible for such objects to contain a different content when loaded back
into a different context than the one they were "saved" from ?
And if this possible context "confusion" exists is there any way to make sure
that objects are saved along with all the necessary context ?
Note that I am not writing any code related to the subject, I am just curious ;)
Also I did not manage to see what was exactly the difference beetween doing "do
load mold/all" and simply doing "do load mold" in your example.
Both seems to produce the same result, so what benefit does the /all exactly
bring in that case ?