Subject: Re: NULL vs. ""

From: Philip Guenther <[email-masked]>
Date: Thu, 14 Jul 2005 18:24:37 -0700

[cleaning my mailbox of unanswered suggestions...]

Barry Leiba <[email-masked]> writes:
>> On Mon, 2005-05-30 at 09:21 -0700, Ned Freed wrote:
>>>>if anyof (header :is "Cc" "", not exists "Cc")
>>>
>>>This is actually clearer to read IMO, and is probably how I would code it if
>>>I ever wanted such a test.
>
>Indeed.  And so why don't we wrap up this too-long discussion this way?:
>1. *Document* that string comparisons against headers MUST NOT match 
>absent headers.

I've updated 5.7p3, second sentence to now read:
    However, if the named header is not present, it does not match any
    key, including the empty key.

>2. *Document* that the preferred way to test for a header that is either 
>empty or absent is as Ned wrote above.

I've added as a new paragraph at the end of 5.7:
   The preferred way to test whether a given header is either empty or
   absent is to combine an "exists" test and a "header" test:

           anyof (header :is "Cc" "", not exists "Cc")

Philip Guenther

---

From: Ned Freed <[email-masked]>
Date: Thu, 14 Jul 2005 18:57:15 -0700 (PDT)

>     key, including the empty key.

Look good to me.

>            anyof (header :is "Cc" "", not exists "Cc")

WFM as well.

				Ned