Title : SIEVE Email Filtering: Include Extension
Author(s) : C. Daboo
Filename : draft-daboo-sieve-include-04.txt
Pages : 13
Date : 2006-6-13
Boring nit:
- The explicit use of "export and "import", coupled with the default
+ The explicit use of "export" and "import", coupled with the default
Must you do this?
In the examples below, script content is indicated by a '|' as the
first non-space character on a line for clarity. The '|' characters
are not part of the script itself.
Means copy/paste of sieve code is awkward. :o(
In:
The "import" command contains a string list argument that defines one
or more variables names of variables exported and set by other
scripts which should be made available to the current script.
and:
If an "import" command lists a variable that has not been exported
and set by any other script at that point during the SIEVE execution
process, then an error MUST occur.
If you remove "and set" as agreed, then what is the difference between import
and export? I'm not clear why we can't just have a "global" command with a
string list argument of variables instead. Either that or just specify that
all variable names starting with "global." have global scope.
Must we say this?
The "import" command, if present, MUST be used immediately after any
"require" commands (at least one of which will be present listing the
"include" extension). Multiple "import" commands are allowed. An
error occurs if an "import" command appears after a command other
than "require" or "import". Use of the "import" command makes the
listed variables immediately available for use in the body of the
script that uses it.
I would imagine a use of import would be linked to some kind of "rule". If
later we remove the rule, we may forget to remove the variable names from the
"import" and then our "import" command will slowly fill up with silt. I'd
prefer to "declare" the variables near their use. Is there some technical
reason why we want it that way or are you trying to enforce a script writing
prefence?
This restriction in C is one of the reasons I tend to convert .c files to .cpp
even if I have no immediate plan to use objects. :o(
Cheers
Nigel