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

[REBOL] Re: Redefining system words - gotchas

From: dhsunanda::gmail at: 27-Apr-2007 18:57

> This scenario is not likely, especially if one sticks to a strict taxonomic > convention of redefining system words as 'sys-word, but I'd welcome > comments on this situation. > thanks > tim
We have exactly the same situation in the CGI base for ** we have a large number of CGI scripts, many of which were written as "top level" but now are called from other scripts....So we can never assume any given script has the sole responsibility for initialising or terminating processes; ** we incorporate other people's code as far as possible without having to modify the code. That means we need wrappers in some cases to remove actions that are unsuitable for CGI scripts -- we don't want (say) makedocpro doing a Print into the middle of our HTML output stream. Our solution is almost identical to yours: do-if 'sys-pick[ sys-pick: get in system/words 'pick ] do-if executes the block if the word is *not* defined.....So you'll see the Library CGI code littered with 'do-if statements rather than 'do. It's not perfect, but it works for us. Sunanda.