4 ms·
The original LISP is pure functional in the sense that you don't change state of an object.
by doall 9y ago
The original LISP is pure functional in the sense that you don't change state of an object.
- cronjobber 9y agoYou are right, the 1960 paper describes a language that is a pure functional language. I think it even was the first published pure functional language (pointers to earlier work welcome, of course).
- kbp 9y ago> The original LISP is pure functional in the sense that you don't change state of an object. Are you sure about that? RPLACA, RPLACD, NCONC, etc are present in the Lisp 1 Programmer's Manual dated March 1st, 1960: http://bitsavers.trailing-edge.com/pdf/mit/rle_lisp/LISP_I_Programmers_Manual_Mar60.pdf http://bitsavers.trailing-edge.com/pdf/mit/rle_lisp/LISP_I_P...
- doall 9y agoThe original paper of LISP by John McCarthy http://www-formal.stanford.edu/jmc/recursive.html http://www-formal.stanford.edu/jmc/recursive.html Or the more accessible explanation by Paul Graham http://www.paulgraham.com/rootsoflisp.html http://www.paulgraham.com/rootsoflisp.html There are only few primitives and no such things as RPLACA, RPLACD, and NCONC.
- kazinator 9y agoThey are in the Lisp 1 Programmer's Manual, also dated 1960. The white paper doesn't reproduce the entire reference manual; what are the odds?
- doall 9y agoI'm not talking about the implementation of LISP 1 by Steve Russell, but the original idea of LISP invented by John McCarthy that shows its purity, and that is before the implementation by Russell.
- kazinator 9y agoThe paper you cited is dated 1960 and bears McCarthy's name. The Lisp 1 Programmer's Manual is dated 1960 and ... bears McCarthy's name. The paper you cited has a section titled The LISP Programming System which says: "The LISP programming system is a system for using the IBM 704 computer to compute with symbolic information in the form of S-expressions." The Programmer's Manual's Preface begins: "LISP 1 is a programming system for the IBM 704 for computing with symbolic expressions." Looks like they are about exactly the same thing to me: an implementation for a specific computer (IBM 704), described in the same year by the same author, with an a nearly identical sentence in the intro.
- doall 9y agoJohn McCarthy is not the one who implemented LISP 1 in IBM 704, but it is Steve Russell. McCarthy invented the idea of LISP in 1958 https://www-cs.stanford.edu/memoriam/professor-john-mccarthy https://www-cs.stanford.edu/memoriam/professor-john-mccarthy that is before the 1960 paper and the LISP 1 manual. In the 1960 paper, he showed that LISP can be implemented in just few primitives that showed its purity of LISP. Of course you can develop a non pure version of LISP which is more practical.
- lispm 9y agoThe original idea of McCarthy was to have a list processing language on the IBM 704. http://jmc.stanford.edu/articles/lisp/lisp.pdf http://jmc.stanford.edu/articles/lisp/lisp.pdf Lisp was always as much as an idea as a real proramming language and both were developed together. Lisp was developed as a practical tool for AI research, especially for his AI research.
- doall 9y agoIn the paper you shown "One mathematical consideration that influenced LISP was to express programs as applicative expressions built up from variables and constants using functions. I considered it important to make these expressions obey the usual mathematical laws allowing replacement of expressions by expressions giving the same value. The motive was to allow proofs of properties of programs using ordinary mathematical methods. This is only possible to the extent that side-effects can be avoided. Unfortunately, side-effects are often a great convenience when computational efficiency is important, and “functions” with side-effects are present in LISP." Reading above, in his original idea, he clearly had the idea of mathematical pureness for LISP, but for practical reasons the real implementation became one with side-effects.
- kbp 9y ago> The original paper of LISP by John McCarthy http://www-formal.stanford.edu/jmc/recursive.html http://www-formal.stanford.edu/jmc/recursive.html > Or the more accessible explanation by Paul Graham http://www.paulgraham.com/rootsoflisp.html http://www.paulgraham.com/rootsoflisp.html > There are only few primitives and no such things as RPLACA, RPLACD, and NCONC. That paper is from a month after the manual I posted. It's pretty open about not covering the entirety of Lisp, too, for instance in the section "The LISP Programming System" it says: In addition to the facilities for describing S-functions, there are facilities for using S-functions in programs written as sequences of statements along the lines of FORTRAN (4) or ALGOL (5). These features will not be described in this article.
- doall 9y agoThe implementation by Steve Russell includes those facilities, but the original idea of LISP by John McCarthy don't have to include those facilities and can be implemented as a pure functional language and is shown in the paper.
- kbp 9y agoBut can you find anything to point to from that period that talks about an actual programming language called Lisp from that time that was purely functional? McCarthy's 1960 paper isn't about Lisp, it's about recursive functions of symbolic expressions and their computation by machine, using a subset of Lisp as a vehicle for talking about the latter part. The section that is actually about Lisp has an explicit disclaimer that he will only be talking about Lisp as it applies to the broader theory he is discussing. It's about Lisp in the same way that SICP is. No one's denying that Lisp's early history wasn't wrapped up in early research on functional programming, but I haven't seen any evidence to support the claim that any programming language or anything called Lisp from that time period was purely functional.
- doall 9y agoSo the definition of "LISP" matters. Your definition of LISP seems to be the actual implementation, such as LISP 1. But as many historians say, LISP was invented in 1958, which the implementation did not even exist. From this fact, LISP does not only mean the actual implementation, but also the idea and the idea is written in the 1960 paper, which represents a pure LISP. The idea is the most important thing of LISP and that is why McCarthy is called the Father of LISP and Steve Russell is not. To further say, there may not exist a pure implementation of LISP in 1960, but there exists the idea of pure LISP in those days that is shown in the 1960 paper.