Warning: mysqli::__construct(): (HY000/1203): User howardkn already has more than 'max_user_connections' active connections in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\includes\artfuncs.php on line 21
Failed to connect to MySQL: (1203) User howardkn already has more than 'max_user_connections' active connections
Warning: mysqli::query(): Couldn't fetch mysqli in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\index.php on line 66
Article <20240403211041.911@kylheku.com>
Deutsch   English   Français   Italiano  
<20240403211041.911@kylheku.com>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Kaz Kylheku <643-408-1753@kylheku.com>
Newsgroups: comp.lang.lisp
Subject: Re: Lisp history: IF, etc.
Date: Thu, 4 Apr 2024 04:28:01 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 58
Message-ID: <20240403211041.911@kylheku.com>
References: <uu54la$3su5b$6@dont-email.me> <uu636l$7haj$1@dont-email.me>
 <20240329084454.0000090f@gmail.com> <uu6om5$cmv8$1@dont-email.me>
 <20240329101248.556@kylheku.com> <uu6t9h$dq4d$1@dont-email.me>
 <20240329104716.777@kylheku.com> <uu8p02$uebm$1@dont-email.me>
 <20240330112105.553@kylheku.com> <uudrfg$2cskm$1@dont-email.me>
 <87r0fp8lab.fsf@tudado.org> <uuehdj$2hshe$1@dont-email.me>
 <87wmpg7gpg.fsf@tudado.org> <LISP-20240402085115@ram.dialup.fu-berlin.de>
 <20240402084057.881@kylheku.com>
 <86h6gjpq3i.fsf_-_@williamsburg.bawden.org>
Injection-Date: Thu, 04 Apr 2024 04:28:01 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="c584e056168df3e72ae6023a5eb1af29";
	logging-data="478417"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18I/WThzvRDNcJfxkJvvWCwhoYLH9RATR4="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:JMkuD0bjKiBLy6BEzjN0F8rwGDs=
Bytes: 4051

On 2024-04-02, Alan Bawden <alan@csail.mit.edu> wrote:
> Kaz Kylheku <643-408-1753@kylheku.com> writes:
>
>    ...  The code is from just before MacCarthy invented the ternary IF,
>    as a shorthand for a one clause cond: ...
>
> I don't think that McCarthy invented IF as an abbreviation for COND, but
> I could be wrong.

OK, I found the smoking gun.  Why, it's under our noses: Maccarthy's
February 1979 "History of Lisp" paper.

http://jmc.stanford.edu/articles/lisp/lisp.pdf

(Don't try HTTPS, it doesn't resolve to the PDF. There may be other
hostings of it.)

Quote:

    I invented conditional expressions in connection with a set of chess
  legal move routines I wrote in FORTRAN for the IBM 704 at M.I.T.
  during 1957-58. This program did not use list processing. The IF
  statement provided in FORTRAN 1 and FORTRAN 2 was very awkward to use,
  and it was natural to invent a function XIF(M,N1,N2) whose value was
  N1 or N2 according to whether the expression M was zero or not. The
  function shortened many programs and made them easier to understand,
  but it had to be used sparingly, because all three arguments had to be
  evaluated before XIF was entered, since XIF was called as an ordinary
  FORTRAN function though written in machine language. This led to the
  invention of the true conditional expression which evaluates only one
  of N1 and N2 according to whether M is true or false and to a desire
  for a programming language that would allow its use.

    A paper defining conditional expressions and proposing their use in
  Algol was sent to the Communications of the ACM but was arbitrarily
  demoted to a letter to the editor, because it was very short.

There you go; no hallucination or urban legends. Now, this does not
establish that MacCarthy ever worked with (if A B C) in Lisp.  But
that is just a variation on the same idea; a footnote, if you will.

MacCarthy used XIF(A, B, C), in his own words, to shorten many programs,
and make them easier to understand, in his own words. (In Lisp, we
can use IF to shorten programs that use COND!)

The part about the "desire for a programming language that would allow
its use" is also important; his inclusion of a conditional in Lisp can
be traced to these thoughts, which have their origin in working with
a three-argument form, and desire to have it with the right evaluation
semantics.

As for Fortran, it eventually caved in and got a conditional operator.
In the year 2021!!! https://j3-fortran.org/doc/year/21/21-157r2.txt

-- 
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca