Kjetil Torgrim Homme wrote:
I think this is fine for features that only enable certain forms
of syntax (since they basically dissapear at parsing time), but is
somewhat less good for things that change global state of the
interpreter.
Implicit keep is another "global state" issue that jumps to mind.
I think I'm currently of the opinion that all global state
(including variables, implicit keep, etc) should be global for the
entire execution. However, the effects of require which only
affect parsing should be limited to the current script only.
if script one require variables, and set variable foo to bar, and
script two doesn't require variables, and contain the string "${foo}",
what should happen? it seems to me you're saying that the string
should be left alone. also, if script two does require variables, the
value of foo will become available, and the string will be expanded to
"bar".
I'm of the other mind, though. If script one sets ${foo}, I would NOT
expect script two to see the value of ${foo}. I'd expect the variable
state to be reset between scripts.
Tony Hansen
tony(_at_)att(_dot_)com