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

[REBOL] RFC: new feature for local word handling

From: robert::muench::robertmuench::de at: 31-Dec-2002 11:39

Hi, playing around with the problem to use a block of code that should be executed in an other context but still uses local words I want to propose a new feature. IMO this problem comes up quite often, especially if want to use the dynamics of Rebol for application architecture. Through the very dynamic of Rebol it's mostly unpossible to handle the requirement with own written code. IMO the only place to handle this with all respects to dynamic execution is the interpreter itself. How about this: myblock: [ myvar: 3 print myvar * 3 myvar2: in system myvar myvar2: myvar * 3 ] do/local myblock This would define 'myvar and 'myvar2 to be bound to a local context. 'myvar2 will refer to the global word 'myvar and alter this. So when using this you have to bring in the global words. But this is a lot easier, because most of the time you know which global words are available. What do you think? Robert