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

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

2005-08-30 15:30:58

On Tue, 2005-08-30 at 22:34 +0100, Nigel Swinson wrote:
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.

... where a global variable is available both to the current script,
to all scripts it includes, and all scripts that include it.

there is only one set of global variables, and they are available in all
scripts which require "globals".  (an included script needs to require
_all_ extensions which modify the behaviour of the script.)

I consider the contents of a .siv file to be a script.  And that you
can build larger scripts by using the include extension.  To declare
that "there is only one script" seems quite confusing to me,

I retract that comment.  it obviously is at odds with the terminology
used in the "include" draft.

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.

.. and it uses the :global modifier when it uses the set action.

no, that is not necessary, the global variable may have been set
previously.
 
"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.)

I agree, and again I think it preferable to change the word "global"
to "file" in the variables draft in order to avoid confusion generated
when reading include+variables.  I would settle for what Aaron just
suggested, but it still means we end up with two meanings for the word
"global".

your suggestion could be used verbatim, IMO:

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

however, it may be needlessly complicated, and this could do as well:

    Variables are only visible to the currently running script.

an explicit definition of "script" would be nice, but I don't see how we
can do it in 3028bis.  a definition in "include" would be good enough, I
think.  in theory, we could have a situation where two documents define
"script" differently, but even if that is the case, it probably wouldn't
be harmful unless a server implements both documents.
-- 
Kjetil T.