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

Re: variables draft (draft-homme-sieve-variables-00.txt)

2003-04-08 10:03:15

Kjetil Torgrim Homme wrote:
 Question:
Should the date variables ALWAYS be preset without executing the
 setdate command?

no.  you may consider the setdate action a different kind of
"require".  the intent is that other actions can be added later to set
variables, without breaking compatibility since the user has to call
the action(s) explicitly.  (if setdate was an extension, we would have
no way of specifying timezone, so there is good reason to make it an
action.)

 Other languages have benefitted from namespaces. It might be
 worthwhile exploring that concept, particularly if there are
 preset variables. For example, instead of the preset variable name
 ${year}, you'd instead have ${time.year}. Thoughts?

how should the namespace namespace be governed?  a registry?  only
available to extensions specified in RFCs?

If setdate is comparable to a "require", then defining such an addition should define the namespace that it places its data into. Perhaps it should be ${setdate.year}, ${setdate.month}, etc. More complex packages might want to use more fully qualified names:

        require "example";
        setfoo ...;
        setbar ...;

        ${example.foo.handle}
        ${example.bar.contenttype}

to make certain that they don't conflict with the "foo" and "bar" namespaces of other "require" constructs.

Whoever defines a "require" extension that sets variables somehow would be responsible for defining the corresponding namespace used by its variables' names.

        Tony Hansen
        tony(_at_)att(_dot_)com


<Prev in Thread] Current Thread [Next in Thread>