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

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

From: sanghabum:aol at: 13-Sep-2001 4:43

Hi Holger,
> Unfortunately your major misconceptions are still in there. The highlights: <snip>
I've very glad that Ladislav Mecir has prompted you into issuing a detailed technical document explaining binding and contexts. I've found it very confusing trying to work all this out from the meagre clues the official documentation provides.....So you can't consider it unlikely that some of us invent terminology in an attempt to understand things. The Core manual fails, for example, to define "Global" as far as I can tell. It does state that: A variable refers to a specific value only within a defined context, such as a block, a function, or an entire program. Outside that context the variable can refer to some other value or to no value at all. The context of a variable can span an entire program or it can be restricted to a particular block, function, or object. Leaving aside that worrying "such as" (*what* other defined but unexplained contexts exist?), we have the term "entire program". This appears to mean one invocation of REBOL.EXE and perhaps is the same as Global Context. But the example %headfull.r script refers to itself as a program, so perhaps entire program means "single script" in some circumstances. And does a launched script share a Global context with its parent, or is Global really "local to program invocation"? And there's more. Like (from the manual again) what does "module" mean here: In large scripts and where possible, avoid using global variables that carry their internal state from one module or function to another. ? The manual has just used another undefined term which is used precisely *once* in the entire document. So I welcome your starting to issue more technical papers on the innards and philosophy of REBOL. And thanks too to Ladislav for prompting it. Long may it continue! --Best wishes, --Colin