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

[REBOL] Re: The truth about scope

From: berniegs:prodigy at: 13-Apr-2005 11:40

Hi Gabriele, Yes, that's it! Your explanation is quite clear, and I really appreciate it.
> And I think this is the source of all your problems: REBOL has
no
> "scope". As long as you think in terms of scope, you may get
into
> problems. > > Now, REBOL gives you the illusion of having something
like a
> "scope" for "variables". This is just an illusion that is
there
> because it is useful to let new users think that way. You
don't
> have to learn all at once, but can learn one step at a time.
When I was just starting with Rebol several years ago, I asked on this forum (or whatever list was active then) if I could safely consider Rebol contexts as the equivalent of scopes in other languages. The answer I received was that I could do that for most purposes. Well, now I'm finding that the answer was the truth, but only up to a point, and now I need to know the "real truth". As you just pointed out, scope is an illusion, and thinking in those terms has indeed gotten me into trouble. I think that it would be appropriate to include an expansion of what you've written here as an appendix to the Rebol User's Guide. It could be considered as something of a Rebol "theory of operation guide", or something like that. It wouldn't be necessary for a beginner to study it, but it would be there for others wishing to get into more advanced applications. I think it would be an extremely helpful contribution to the Rebol documentation.
> If you think everything it's clear up to here, I'll go on
and
> explain what binding means.
Yes, it's much clearer now. You did a great job. Please continue with contexts and bindings. Best regards, Bernie Schneider The individual has always had to struggle to keep from being overwhelmed by the tribe. To be your own man is a hard business. If you try it, you will be lonely often and sometimes frightened. But no price is too high to pay for the privilege of owning yourself. -- Friedrich Nietzsche --