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

Re: Updated Sieve environment draft posted

2008-03-15 14:49:33

On Sat, 15 Mar 2008, Mark E. Mallett wrote:
Except that I made no suggestion that they be tied, and I even said that
I liked the fact that the test(*) doesn't depend on variables.  What I
opined was that the draft could state what the behavior would be in the
presence of the variables extension

One barrier to implementing sieve extensions is exactly that the intersection of two extensions may require special handling. While this is true by necessity for match-types and comparators, we should fight the tendency to add special cases for other combinations that aren't completely necessary.


-- analogous to how it already
states what the behavior is in the presence of the relational extension.
Not that it require variables.

This particular special case seems unnecessary to me. It appears to have been inherited or based on the similar exception for the 'envelope' test. IMHO, that behavior should not be propagated to 'environment'. If you want to test whether an environment item returns the empty string, then just do exactly that!
        if environment :is "foo" ""

My opinion is that the correct model for relational's :count is that it tests against "the number of distinct entities that would otherwise be matched against". I.e., it's the number of different strings that could have been matched by <<:matches "*">>. The count will be zero iff there were no entities to match against.

For environment, that would mean that the count will be zero if the item does not exist. The current draft's exceptional handling of empty strings is a wart that does not increase the expressiveness of the test and should be removed.

(Stepping further up the abstraction ladder: a test command defines how to generate a set of zero or more strings. The comparator and match-type arguments then define how that set of strings is matched against the keys. The :count match-type says "take the decimal representation of the cardinality of the set of match strings, collate (order) that against each key using the indicated comparator and return true if they collate in the direction indicated by the relational-match argument." When we define new test commands, we should *ONLY* be specifying how it generates a set of strings to match against.)


Philip Guenther