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.
the alternative would be to redefine the semantics of header :is so that
header :is "Cc" "" is true even when Cc is non-existent. those who
wishes to check for existance still have the exists test. this shifts
the need for "awkward" code over to those who write careful code in the
first place.
it is much too late to make such a change without it being a new capability.
I'm not sure if such a change to Sieve can be made without the script
explicitly asking for it. it seems pretty innocuous to me, but the
gains are pretty slim, too.
One way you complicate the test for an empty field. The other way you
complicate the test for a missing-or-empty field. The use cases for either one
are not particularly compelling, and given the large cost associated with each
new capability, leaving things alone is the obvious right answer.
Ned