[REBOL] Re: The truth about scope
From: mokkel:gmx at: 14-Apr-2005 9:05
> I would say that my POV (as well as yours as far as I can guess) differs
> from Gabriele's POV in this respect. Gabriele seems (sorry for my "wild
> guess") to try to discern the following:
> string: "a string"
> block: reduce [string string] ; == ["a string" "a string"]
> While I am saying that the first element of Block and the second element
> of Block are identical and don't differ in any respect (i.e. it is just
> one Rebol string referenced twice), Gabriele seems to present a POV,
> that the first element is at the first position of the block while the
> second element is at the second position of the block.
> Such an opinion is an illusion, because the position in Block is not a
> property of the string. It is rather a property of the block, which
> surealy has "positions" or "places" able to refer to Rebol values. So,
> it is safe to say, that the first position of Block refers (currently)
> to the same Rebol string as the second position, while it isn't safe to
> say, that String has got (either first or second) position in Block
> (because it doesn't have such property at all).
I think so too, but I also didn't think of the blocks and that they can
have position either (until Gregg was showing this example) as I was just
concerned with the element. So I thought I'm missing something else also.
> Carl usually says "indefinite scope" in Rebol. To say itmore explicitly,
> it means, that the binding of words doesn't depend ontheir "positions"
> at all (like in the String example above, Rebol wordsdon't "know" their
That's what I just got in the last days consciously. But this should be
also one of the requirements of a keywordless language. For instance (as
far as I understand) in Lisp you can do almost the same powerful things as
in Rebol just by the raw power of lambdas. But one has a fixed binding
model in the way that one knows what variable is bound to what scope when.
I guess this is because at least lambda and the few keywords of Lisp have
a defined meaning, which never changes. In Rebol on the other side if we
can redefine everything and we just have data, then we need the evaluation
model (the rules) and if we want to change something to that we have the
bind function which can do whatever is needed. Isn't in this sense bind
also a keyword, as also in Rebol there have to be some words which have to
be "bound" to the core concepts of Rebol in order to make it working at
all ? (should be x: x :x 'x 'bind  () .... where x is just some word and
bind is the word bound to the current mechanism for binding a word to a
context and the brackets and parents for the evaluation flow and the
invisible general interpreter mechanism with it's rules)
??? :-) I'm still trying to get what was Carls intention in developing
Rebol, as it sounds nice to be able use every possible word in some
context. On the other side if one uses 'parse this isn't anymore exactly
this, because to me 'parse is more like a traditional mechanism (even
though one can bind a chosen amount of words there also). Just binding a
block to a new context and evaluating it is dangerous and thus not really
recommended, so again 'parse should be used. But this could be done in
every traditional language as well (maybe not as comfortable, but still).
So either I have always a trusted source and can happily evaluate and
bind, it's very valuable to be able to do it, but if not and I have to
start parsing, doesn't Rebol actually looses some if its power ?
Just some questions :-).
Thanks for listening.