Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The historical truth is that Lisp had COND first; IF was added later. Also, LAMBDA before LET.

MacCarthy writes, in History of Lisp:

I invented conditional expressions in connection with a set of chess legal move routines I wrotein FORTRAN for the IBM704 at M.I.T. during1957-58. This program did not use list processing. The IF statement provided in FORTRAN1 and FORTRAN2 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.

Yet, no such thing was added to Lisp, initially. The 1960 Lisp 1 Programmer's Manual only lists COND.



An interesting historical note, but it says nothing about the relative 'primitiveness' of COND vs IF.

It's not uncommon at all in mathematics to build a system with certain axioms, and then improve them later, when it's realized that simpler axioms can be used to build more complex constructs.


Either one of cond and if can be primitive and the other one a macro.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: