[REBOL] Re: Context - code included- 2nd version
From: rotenca:telvia:it at: 16-Sep-2001 12:48
> > > It is a feasible idea, but it contains bugs that would prevent it to
> work.
I've read your new implementation of Contexts. Now it is more near to Core
Doc. Must re-read it in the next days.
For now (but you have abandoned Loaded idea):
1) I prefer this for a pratical reason: it doesn't change the global context:
gen-bind: func [
{Binds WORD to a specified context.}
word {A value to bind.}
known-word [word!] {A sample word from the target context.}
] [
first bind to-block mold :word known-word
]
2) My new s-c? This could change the GC but it is very concise. I have another
which doen't change the Gc but it is more long. Is this bug Free?
same-context?: func [
{
find out, if the given Words
are bound to the same Context
}
word1 [any-word!]
word2 [word!]
] [
found? any [
all [
undefined? word2
undefined? :word1
]
all [
not special? word2
same? :word1 gen-bind to-word :word1 word2
]
]
]
Thank you for your attention to my bad code.
---
Ciao (my english is bad)
Romano