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

[REBOL] REBOL just a programming language? (was local vars in functions)

From: brett::codeconscious::com at: 24-Apr-2002 21:36

Hi,
> One part of REBOL that can feel odd is when i have to > define local variables of a function in the first > block of the function. I find it a bit annoying to > have to add new variables to the list for every little > local variable I use.
No doubt you are referring to the sequence: func [...] [...] Which bit is the actual function? (a) the first bit (b) the second bit (c) the third bit (d) all of the above (e) none of the above My preference is for answer (e) however I recognise that it is convenient to talk as if it were (d). But your suggestion of the double colon to indicate "local" variables gives the feeling it might be (c). What if I changed this to: func [...] relative-expression where relative-expression is a word set to a value of type block! So now, if relative-expression (the block) defined what was local and what was global would it still be relative? Relative to what?! - I think that question is the answer to the mystery/purpose of REBOL. :^) My obscure position is that the first block defines what in the second block will *become* bound to the function context and that this usage is closely related to the fundamental design of the REBOL. Brett.