Talk:Lisp (programming language): Difference between revisions

Content deleted Content added
Skyvine (talk | contribs)
Skyvine (talk | contribs)
Line 255:
:Algol 60 had the first if-then-else conditional *statement*. There were many different syntax proposals for conditional statements during the Algol 58 design process, and most of them are very odd from a modern perspective: see <https://github.com/e-n-f/if-then-else/blob/master/if-then-else.md>. The `else` keyword came from the German members of the Algol 58 committee. The keyword `then` first appeared in an Algol 60 draft. McCarthy was involved with Algol. His name appears (with coauthors) on a proposal that includes a multi-branch conditional with no special syntax for an 'else' or for a default fallback clause.
:McCarthy invented the conditional *expression*, which returns a value. His preferred syntax was (cond1 -> expr1, cond2 -> expr2, ...). There was no distinguished `else` clause: instead you used `T -> expr` as the final clause to specify a fallback. [[Special:Contributions/209.183.136.7|209.183.136.7]] ([[User talk:209.183.136.7|talk]]) 20:05, 19 April 2023 (UTC)
::I thought the main distinction was that it took in statements instead of line numbers. The quote above form Zz mentions that "the IF statement provided in FORTRAN 1 and FORTRAN 2 was very awkward to use". FORTRAN 2 accepts statement numbers to jump to, rather than expressions to be conditionally executed, as seen in the FORTRAN 2 manual (pdf page 10 from https://archive.org/details/bitsavers_ibm1620C26_4090774/page/n9/mode/2up).
::Although, now that I'm looking at it again I'm also noticing it's a 3-way if: less than, equal to, or greater than 0, which is another difference from lisp's if. [[User:Skyvine|skyvine ]] ([[User talk:Skyvine|talk]]) 20:13, 14 January 2025 (UTC)
 
== Second Oldest Programming Language ==