[Top] [All Lists]

Re: Updated Sieve environment draft posted

2008-03-15 14:53:12

On Fri, 14 Mar 2008, Ned Freed wrote:
> First of all, the specification says that any test against an unknown
> item must fail unconditionally. This provides a simple way to check and
> see if a given item is available:
>   if environment :matches "item" {...}

There's a pattern missing there.

Right, sorry about that.

Regardless, the empty substring test is
probably more efficient:
        if environment :contains "item" "" { ... }

This almost always works, but not in the case where the environment
item has the null string as a possible return value.

Ummm, what?  Are you saying that there exists some case where
        if environment :matches "item" "*" { ... }
        if environment :contains "item" "" { ... }

would return different results?

If that's not what you meant, then I don't understand what you're saying.

I strongly believe that <<:matches "*">> and <<:contains "">> MUST have the same result with *any* combination of test and comparator.

Philip Guenther