5 ms·
No, Lisp did not invent if statements. They're in Fortran's 1956 Programmer's Reference Manual. http://bitsavers.informatik.uni-stuttgart.de/pdf/ibm/704/704_Fo
by CalChris 3y ago
No, Lisp did not invent if statements. They're in Fortran's 1956 Programmer's Reference Manual.
http://bitsavers.informatik.uni-stuttgart.de/pdf/ibm/704/704_FortranProgRefMan_Oct56.pdf http://bitsavers.informatik.uni-stuttgart.de/pdf/ibm/704/704...
- thequux 3y agoFortran 56's IF statement is very different from the Lisp if statement; the former is a conditional jump, and the latter is a structured control flow construct. Further, Fortran 56's DO isn't a do/while loop as we know it today, but rather a conditional come from. The entire concept of structured control flow was invented by Lisp, and it was very controversial at the time.
- CalChris 3y agoDid Lisp improve the IF statement? Certainly. But here's John freakin' McCarthy citing Fortran's IF statement which he had used. That means Lisp didn't invent the IF statement. Lisp invented better syntax. http://jmc.stanford.edu/articles/lisp/lisp.pdf http://jmc.stanford.edu/articles/lisp/lisp.pdf
- lispm 3y agoHe invented the conditional expression. (print (cond ((> a 10) "a is larger than 10") ((> a 20) "a is larger than 20") (t "a is smaller than or equal to 10"))) COND takes zero or more conditional expressions and returns a value.