[REBOL] Re: [encompass.r]
From: maximo::meteorstudios::com at: 28-Nov-2003 11:09
> There is no notion of current context.
> The same function can be referenced by words
> in two different objects, can't it?
> Therefore, which context is "current"?
yeah you're right, I'd forgotten that once bind is done, the function itself does not
have any knowledge of context... each word stores its context by itself...
funny I forgot, since I gave a demo on this list of how you can have a block with the
same three words in it with each one containing differrent information... its amazing
how one has to bang his head until you figure just how powerfull this really is.
probe reduce [w w w] in rebol, can be made to print:
"something else" "yet another value"
something which isn't possible in most other languages without inserting the reduced
value in the block.
> It's probably infeasible to add a complete
> undo function, but perhaps an /original
in theory, I already have the original function.
a /context refinement might be good to, where you replace the default /system/words/
"context" by any path! value of your choosing.
but, since the encompass returns the new function... the old one is not overidden until/unless
YOU decide. IT does not overide the function it merely uses it. That is why in the
example I backup read to old-read. So if I ever wanted to reset read back by default,
I'd just need to do:
so maybe this whole restore/revert thing really isn't usefull, for all the problems it
would create (and asumptions it would need).
like I said in one of my recent mails...
Often, simple is longest to achieve.
we can go round and round and eventually, realize that all the nice ideas aren't as simple
as if they didn't even exist. ;-)