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

Re: NULL vs. ""

2005-05-27 07:29:08

Kjetil Torgrim Homme writes:
On Fri, 2005-05-27 at 14:49 +0200, Arnt Gulbrandsen wrote:
 >            header :is ["X-Caffeine"] [""]         => false
 >            header :contains ["X-Caffeine"] [""]   => true

There are no null strings here, only empty strings, so I don't think it's relevant.

the example wasn't very relevant here, since the header exists.

And since "" is a empty string, not an NULL string. The comparator text states that NULL strings aren't substrings of anything, so :contains ["X-Caffeine"] [:null] should evaluate to false (if :null were valid).

consider instead:

   header :contains "X-Absent" ""

the LHS of the comparison is the value of lookup_header("X-Absent"), and it returns a NULL value (do not confuse with "null key" :-). it seems to me that the comparator draft needs to support NULL values to be able to support Sieve semantics.

Well, can you show some example where it actually makes a difference, and where the difference is useful? It has to be some collation operation where it's sensible and understandable that NULL (TBD) is distinct from "". The draft offers two properties that seem relevant to sieve:

1. NULL is equal only to NULL. The example could use :is.

2. NULL is not a substring of anything. The example could rely on :contains to return false if the second argument is NULL.

I can't construct such an example, and I really don't want to take the draft forward with a feature that's incompatible with some running code and whose utility I cannot explain.

Arnt


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