ietf-mta-filters
[Top] [All Lists]

Re: I-D ACTION:draft-daboo-sieve-include-03.txt (fwd)

2005-08-30 13:58:54

On Tue, 2005-08-30 at 18:26 +0100, Nigel Swinson wrote:
Well at the risk of getting hit, I think it would be wise to change it from:

   All variables have global scope: they are visible until processing
   stops.

To:

   All variables have file scope: they are visible to the remainder
   of the current script.

the consequence of this is that global variables are only visible in
included scripts if they require the "include" extension themselves.  I
don't think this natural behaviour, and why I have advocated making
variables global by default.

there is an alternative which may be easier to get consensus for:  the
change of text above, and an extra extension, call it "globals".
"globals" adds the :global modifier for "set" _and_ makes already
declared globals available to the current script.

this means that a script will only be able to use the variables it has
set itself unless it explicitly asks to import the globals.

"globals" can be put in the "include"-document, or in a separate
document.  I favour the former as I think there is a natural connection.
(it could also be in "variables", but that would delay the document
needlessly.)
-- 
Kjetil T.