XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
RE: [xml-dev] XML design of ((a and b) or c)

The selective evaluation of AND and OR pre-dates C [1] and dates back to
at least 1962 [3], and possibly back to 1958 [4].

The Algol 58 report [2] mentions the boolean operators and says they are
evaluated left-to-right but omits any mention of early exit to
evaluation.   Al Perlis was the first author of the Algol 58 report, but
John McCarthy was a contributor, and McCarthy was the first author of
the Lisp 1.5 manual (1962)[3] which clearly states it:

    Logical Connectives
    -and[ x ;x2. . . ;xn] : FSUBR predicate
    The arguments of are evaluated in sequence, from left to right,
until one is found
    that is false, or until the end of the list is reached. The value of
& is false or true
    respectively.
    -0r[ x1;x2.. .; xn] : FSUBR predicate
    The arguments of or are evaluated in sequence from left to right,
until one is found
    that is true, or until the end of the list is reached. The value of
2 is true or
    false respectively. 

It's possible that Lisp in 1958 had the AND/OR feature; [4] is a good
read but doesn't give clear enough indication of Lisp prior to 1.5.

Does anybody know of a language after Algol 58 and before Lisp 1.5 that
had this feature?

[1] http://cm.bell-labs.com/cm/cs/who/dmr/chist.html
[2] http://portal.acm.org/citation.cfm?id=594925
[3]
http://community.computerhistory.org/scc/projects/LISP/book/LISP%201.5%2
0Programmers%20Manual.pdf 
[4] http://www-formal.stanford.edu/jmc/history/lisp/lisp.html

Leigh.

-----Original Message-----
From: Tei [mailto:oscar.vives@gmail.com] 
Sent: Wednesday, December 13, 2006 11:01 AM
To: xml-dev@lists.xml.org
Subject: Re: [xml-dev] XML design of ((a and b) or c)

On 12/13/06, Richard Salz <rsalz@us.ibm.com> wrote:
> > blame stephen bourne (i think he started this).
> >
> > The famous sh script: programA && programB etc where programB is
only
> > run if programA returns true.
>
> Nope, it was a C thing.  (The Bourne shell implemented the
sort-circuit
> operators, but itself was implemented in Algol-like C;
> http://minnie.tuhs.org/UnixTree/V7/usr/src/cmd/sh/cmd.c.html)
>
>         /r$

Sort-circuit is a life saver in a world with the dreaded division by
zero error/exception

Also, prolog has que simbol  ! that stop the recursive search.  If
prolog is anything like a xml rules engine, having sort circuit rules,
and maybe symbols, made sense.

_______________________________________________________________________

XML-DEV is a publicly archived, unmoderated list hosted by OASIS
to support XML implementation and development. To minimize
spam in the archives, you must subscribe before posting.

[Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
subscribe: xml-dev-subscribe@lists.xml.org
List archive: http://lists.xml.org/archives/xml-dev/
List Guidelines: http://www.oasis-open.org/maillists/guidelines.php



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS