Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: Context - code included- 2nd version

From: lmecir:mbox:vol:cz at: 12-Sep-2001 1:24

I don't know if the discussion didn't start to be boring, but here are my reactions:
> I want to say that if the binding has been different ("this context" was > different) the word could be defined. If you ask its value after the
> of word, you'll get a value, because "this context" (global+local) will be > different.
I will try to interpret the above sentence and discuss it: First of all I understood, that you defined : This Context is a collection of all Global and Local Words. Am I right? (The definition is a bit contradictory, because This Context is not a Context.) ; a Special word: special: first to block! "foo" ; bind it to a context: use special reduce [ bound: 'first reduce [special] ] I bound the SPECIAL ('foo) to a USE context and stored the result to BOUND. Nevertheless, the SPECIAL ('foo) still doesn't look changed. It still looks like a Special Word. Are you trying to convince me that it shouldn't, because it has been bound to the This Context?
> You prefer your interpretation, i think, because you want to keep your > definition of context like a simple collection. > I have the impression you don't like the concept of Context at all.
> You speak > of bind (16.) after the definition of almost everything (global, local, > special - context as collection) as if binding was a secondary propriety
> Context (and you say very little of bind function in 16.). For me Context
> not understandable well without the notion of binding.
The reason for that is much simpler. If I want to describe the behaviour of BIND, I must speak about Contexts. If I want to speak about Contexts, I must first define the notion, because that was my goal when I started to write the article. Basic fact # 1: My definition of the Rebol Context notion is the only definition available. Basic fact # 2: My definition of the Rebol Context notion differs from the meaning the context notion usually has in other languages.
> Indeed, your definition of collection (11.) depends from the notion of > bindings:
Not at all, it only uses a Rebol function the implementation of which I wrote. When I did it I didn't need any notion of bindings. I needed only to write something in Rebol.
> Rebol Contexts can be defined as some collections of Rebol Words. I
define a
> function, that can find out, if two given Words are bound to the same > Context: > > ^^^^^^ > same-context?: func [ > ... > not special? word2 > same? word1 bind use word1 reduce ['first reduce [word1] ] > word2 > ^^^^^ > > As i have already said: your same-context function is not correct: it can
> prove that every Special Word is not binded to other words, so if you want > speak of collections, you must say that it is a collection with one item
> the Zero?).
Incorrect. I am stating that if WORD1 is a Special Word, then the expression same-context? word1 word2 yields TRUE if WORD2 is a Special Word and FALSE otherwise.
>You should say: > > Every single Special Word is a Special Context.
Incorrect. The collection of all Words that are in the SAME-CONTEXT as a Special Word is the collection of all Special Words.
> Every Special Context is a collection of only one word.
Incorrect. See above.
> There are as many Special Contexts as Special Words.
Incorrect. See above.
> The number of Special Contexts is enlarge-able. > It does not exist in Rebol one method to find all Special Contexts.
Incorrect. See above. ...snip... Cheers Ladislav