Re: Lisp history: IF, etc.

Liste des GroupesRevenir à cl lisp 
Sujet : Re: Lisp history: IF, etc.
De : alan (at) *nospam* csail.mit.edu (Alan Bawden)
Groupes : comp.lang.lisp
Date : 04. Apr 2024, 10:17:15
Autres entêtes
Organisation : ITS Preservation Society
Message-ID : <86r0flo838.fsf@williamsburg.bawden.org>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
User-Agent : Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)
Kaz Kylheku <643-408-1753@kylheku.com> writes:

   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.

You can find his CACM letter online at: https://doi.org/10.1145/368405.1773349

Interestingly he did not propose using "if A then B else C" as the
syntax but rather "(A → B, T → C)", almost the same as in M-expressions!
(It would be cool if you were allowed to use the "(→,→)" form in what
Algol calls the "publication language", where you can write "x₉" instead
of "x[9]", but that is not the case.)

   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!)

Not really the same as "invented the ternary IF, AS A SHORTHAND FOR A
ONE CLAUSE COND", but yeah it's certainly another way to get confused
about what actually happened.

   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

Now that's a hoot.  But that seems to just be a proposal.  Does anyone
know if this was accepted?

- Alan

Date Sujet#  Auteur
2 Apr 24 * Lisp history: IF, etc.56Alan Bawden
2 Apr 24 +- Re: Lisp history: IF, etc.1Kaz Kylheku
3 Apr 24 +- Re: Lisp history: IF, etc.1Gijs Hillenius
3 Apr 24 +- Re: Lisp history: IF, etc.1Gijs Hillenius
3 Apr 24 +* Re: Lisp history: IF, etc.49Madhu
3 Apr 24 i`* Re: Lisp history: IF, etc.48Alan Bawden
3 Apr 24 i +* Re: Lisp history: IF, etc.35Paul Rubin
3 Apr 24 i i`* Re: Lisp history: IF, etc.34Alan Bawden
4 Apr 24 i i +* Re: Lisp history: IF, etc.32Paul Rubin
4 Apr 24 i i i+* Re: Lisp history: IF, etc.5Lawrence D'Oliveiro
4 Apr 24 i i ii+* Re: Lisp history: IF, etc.3Axel Reichert
4 Apr 24 i i iii+- Re: Lisp history: IF, etc.1Lawrence D'Oliveiro
4 Apr 24 i i iii`- Re: Lisp history: IF, etc.1Paul Rubin
4 Apr 24 i i ii`- Re: Lisp history: IF, etc.1Kaz Kylheku
4 Apr 24 i i i`* Re: Lisp history: IF, etc.26Alan Bawden
5 Apr 24 i i i `* Re: Lisp history: IF, etc.25Paul Rubin
5 Apr 24 i i i  `* Re: Lisp history: IF, etc.24Julieta Shem
5 Apr 24 i i i   +- Re: Lisp history: IF, etc.1Julieta Shem
6 Apr 24 i i i   +- Re: Lisp history: IF, etc.1Lawrence D'Oliveiro
15 Apr 24 i i i   `* Re: Lisp history: IF, etc.21Paul Rubin
16 Apr 24 i i i    `* Re: Lisp history: IF, etc.20Jeff Barnett
16 Apr 24 i i i     +* Re: Lisp history: IF, etc.2Lawrence D'Oliveiro
16 Apr 24 i i i     i`- Re: Lisp history: IF, etc.1Jeff Barnett
16 Apr 24 i i i     +* Re: Lisp history: IF, etc.16Paul Rubin
16 Apr 24 i i i     i`* Re: Lisp history: IF, etc.15Jeff Barnett
16 Apr 24 i i i     i `* Re: Lisp history: IF, etc.14Lawrence D'Oliveiro
16 Apr 24 i i i     i  +* Re: Lisp history: IF, etc.12Paul Rubin
17 Apr 24 i i i     i  i`* Re: Lisp history: IF, etc.11Lawrence D'Oliveiro
17 Apr 24 i i i     i  i `* Re: Lisp history: IF, etc.10Paul Rubin
17 Apr 24 i i i     i  i  `* Re: Lisp history: IF, etc.9Jeff Barnett
17 Apr 24 i i i     i  i   `* Re: Lisp history: IF, etc.8Lawrence D'Oliveiro
17 Apr 24 i i i     i  i    `* Re: Lisp history: IF, etc.7Paul Rubin
17 Apr 24 i i i     i  i     +* Re: Lisp history: IF, etc.3Madhu
18 Apr 24 i i i     i  i     i`* Re: Lisp history: IF, etc.2Lawrence D'Oliveiro
18 Apr 24 i i i     i  i     i `- Re: Lisp history: IF, etc.1Paul Rubin
17 Apr 24 i i i     i  i     `* Re: Lisp history: IF, etc.3Ben Bacarisse
18 Apr 24 i i i     i  i      `* Re: Lisp history: IF, etc.2Lawrence D'Oliveiro
18 Apr 24 i i i     i  i       `- Re: Lisp history: IF, etc.1Stefan Monnier
17 Apr 24 i i i     i  `- Re: Lisp history: IF, etc.1Jeff Barnett
17 Apr 24 i i i     `- Re: Lisp history: IF, etc.1Stefan Ram
4 Apr 24 i i `- Re: Lisp history: IF, etc.1Ben Bacarisse
3 Apr 24 i +* Re: Lisp history: IF, etc.7Kaz Kylheku
4 Apr 24 i i+* Re: Lisp history: IF, etc.5Alan Bawden
4 Apr 24 i ii+* Re: Lisp history: IF, etc.3Kaz Kylheku
4 Apr 24 i iii`* Re: Lisp history: IF, etc.2Kaz Kylheku
4 Apr 24 i iii `- on levels of disappointment (Was: Re: Lisp history: IF, etc.)1Julieta Shem
4 Apr 24 i ii`- Re: Lisp history: IF, etc.1Julieta Shem
5 Apr 24 i i`- Re: Lisp history: IF, etc.1Spiros Bousbouras
4 Apr 24 i +* Re: Lisp history: IF, etc.3Lawrence D'Oliveiro
4 Apr 24 i i`* Re: Lisp history: IF, etc.2Alan Bawden
4 Apr 24 i i `- Re: Lisp history: IF, etc.1Kaz Kylheku
12 Apr 24 i `* Re: Lisp history: IF, etc.2Alan Bawden
12 Apr 24 i  `- Re: Lisp history: IF, etc.1Lawrence D'Oliveiro
4 Apr 24 `* Re: Lisp history: IF, etc.3Kaz Kylheku
4 Apr 24  `* Re: Lisp history: IF, etc.2Alan Bawden
4 Apr 24   `- Re: Lisp history: IF, etc.1Lawrence D'Oliveiro

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal