Subject: Alternative definitions for 5.1 (allof) and 5.2 (anyof)

From: "Alan K. Stebbens" <[email-masked]>
Date: Thu, 12 Nov 1998 10:37:57 -0800

I would like to propose alternative definitions for the "allof" (Sec 5.1)
and "anyof" (5.2) tests.  The essential difference is to allow the words
"and" and "or" as binary, infix operators for equivalent semantics.

5.1. Test allof / and

   Syntax:   allof ( <test> , <test> , ... <test> )
	 or:   <test1> and <test2>

   The allof test preforms a logical AND on the tests supplied to it.  The
tests
   evaluated from left to right, and evaluations of the tests stops on the
first
   test with a "false" result. The allof test takes as its argument a
test-list.

   The "and" operator returns the logical AND of both tests.  <Test1> is
   evaluated first, and only if its result is true then <test2> is
evaluated.
   Multiple occurances of "and" within the same test expression is evaluated
   from left to right.  I.e.:

	<test1> and <test2> and <test3>

   is equivalent to

	(<test1> and <test2>) and <test3>

   Examples:  allof (false, false)  =>   false
              allof (false, true)   =>   false
              allof (true, true)    =>   true

		  exists header ["To"] and exists header ["Cc"]

Similarly, the "anyof" definition should be:

5.2. Test anyof / or

   Syntax:   anyof ( <test> , <test> , ... <test> )
       or:   <test1> or <test2>

   The anyof test preforms a logical OR on the tests supplied to it.  Tests
   are evaluated from left to right, stopping at the first test that results
   in a "true" result.

   The "or" operator returns the logical OR of both tests.  <Test1> is
evaluated
   first, and only if its value is "false", then <test2> is evaluated.
Multiple
   occurances of "or" within the same test expression are evaluated from
left to
   right. I.e.:

	<test1> or <test2> or <test3>

   is equivalent to:

	(<test1> or <test2>) or <test3>

   Examples:  anyof (false, false)  =>   false
              anyof (false, true)   =>   true
              anyof (true, true)    =>   true

		  exists header ["To"] or exists header ["Cc"]
--
Alan K. Stebbens <[email-masked]>

---

From: Tim Showalter <[email-masked]>
Date: 12 Nov 1998 17:12:34 -0500

The point of "allof"/"anyof" was to allow prefix operators (i.e.,
"really easy to parse") in place of infix and/or operators (i.e., more
difficult to parse).

I do not want this change, nor do I want two or operators.

Alan, you may wish to note that the wording changes as presented don't
have the necessary changes to the grammar to support them.

-- 
Tim Showalter <[email-masked]>

---

From: Alexey Melnikov <[email-masked]>
Date: Fri, 13 Nov 1998 01:14:34 +0300

>                   exists header ["To"] or exists header ["Cc"]

As I understand you want to solve problem with short-circuit evaluation by
adding "and" an "or".
I have no objections, but this will complicate parsing.

--
Regards,
Alexey Melnikov
------------------------------------------
SMTP/POP3/IMAP4/ACAP servers creation team

Epsylon Technologies, Russia
 http://www.taxxi.com

Imap Development Kit (my own product)
http://194.87.43.111/homerus/mail/idk/index.htm

Fax (in San Diego, California): 1 (619) 8393837
------------------------------------------