[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: XML design of ((a and b) or c)

  • From: "Klotz, Leigh" <Leigh.Klotz@x...>
  • To: "Tei" <oscar.vives@g...>, <xml-dev@l...>
  • Date: Wed, 13 Dec 2006 12:02:30 -0800

RE:  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@g...] 
Sent: Wednesday, December 13, 2006 11:01 AM
To: xml-dev@l...
Subject: Re:  XML design of ((a and b) or c)

On 12/13/06, Richard Salz <rsalz@u...> 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@l...
subscribe: xml-dev-subscribe@l...
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]


Purchase Stylus Studio Online Today!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.