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

[REBOL] Re: Function Context Query

From: rotenca:telvia:it at: 7-Dec-2001 3:08

Hi, Marck
> My preference would be all words are defined as local to their context,
including words defined in objects, functions and use contexts. All undefined words are intitialised to the 'unset value and are testable with the value? or unset? get/any 'word functions. Well, a question of taste (and strict ortogonality).
> This seems the most logical, simple, straightforward and consistent solution
to me, however it's not REBOL behaviour so we just have to make do with the quirkiness that is current REBOL behaviour / design. If you prefer unset value, you could use (and eventually extends to implements args) this joke example which is like a "delayed use block" (define once and use many times) (is 9/10 times faster than an use block):
>>ufunc: func [locals body][does second func locals body] >>k: ufunc [a b c][a] >>k
** Script Error: a has no value ** Where: k ** Near: a --- Ciao Romano