W3C home > Mailing lists > Public > www-webdav-dasl@w3.org > April to June 1998

RE: semantics of AND and OR with zero or one argument.

From: Babich, Alan <ABabich@filenet.com>
Date: Fri, 24 Apr 1998 19:44:13 -0700
Message-ID: <72B1992276A9D111A20E00805FEAC96D0FD646@cm-expo1.filenet.com>
To: "'Jim Davis'" <jdavis@parc.xerox.com>, www-webdav-dasl@w3.org
Cc: "Babich, Alan" <ABabich@felix.filenet.com>
I don't believe we would be doing anyone a favor by extending
AND and OR to the one or zero operand case. Nothing is gained,
and I guarantee some people will be confused. Most people
who catch it will think it's an error in the grammar. Most people
don't know or care about Lisp semantics. Probably more than
half of the people would guess the value for zero operands for 
AND and OR incorrectly. Only a small minority of the future
DASL users will be mathematicians or LISP programmers.
Let's apply the KISS principle here. We can only win by doing
so, and only lose by not doing so. Just because it can be done
(in fact, it can be done in more than one perfectly clear 
but not necessarily intuitive way), doesn't mean that it should 
be done.

As a real world example, suppose you cataloged your collection
by using a relational database. (This will happen a lot in the case of
commercial document management systems.) Then, you have to 
convert DASL queries to SQL. You would be forced to write special
case code for the cases that AND and OR had zero or
one operators to drop out the AND or the OR, 
so that you wouldn't generate a SQL syntax
error. I claim that that is obviously a bad thing. So, lets keep AND
and OR as they were, i.e., with 2 or more operands.

Alan Babich

> -----Original Message-----
> From:	Jim Davis [SMTP:jdavis@parc.xerox.com]
> Sent:	April 20, 1998 3:38 PM
> To:	www-webdav-dasl@w3.org
> Subject:	semantics of AND and OR with zero or one argument.
> At 02:11 PM 4/20/98 PDT, Saveen Reddy (Exchange) wrote:
> >Alan, 
> >	As you point out the original 00 syntax was incorrect. That was
> an
> >error corrected in the 01 version. The correction in 01 probably
> needs
> >further work as well -- it defines AND and OR as accepting exactly
> >two-arguments instead of any list of 2 or more. If there are no
> objections
> >I'll go ahead and update the document to use the syntax you provided
> below.
> Actually, there are perfectly clear semantics for AND and OR of one or
> even
> zero operators.   AND with no arguments is trivially TRUE, and OR is
> These are the definitions that fall out of defining AND as evaluating
> each
> argument in turn, until FALSE (or should I say NIL) is obtained
> (yielding
> FALSE) or end of list, which returns TRUE.  (Likewise, mutatis
> mutandis,
> for OR.)  Lisp uses these semantics.
> Why not support these semantics?
Received on Friday, 24 April 1998 22:46:18 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:22:38 UTC