3 ms·
It annoys me when people talk about what McCarthy did, and credit to him features that only appeared later and were borrowed from elsewhere. For example this a
by btilly 4y ago
It annoys me when people talk about what McCarthy did, and credit to him features that only appeared later and were borrowed from elsewhere.
For example this article brings up static typing as one of Lisp's innovations. In fact that first appeared in ALGOL-60 and didn't make its way into Lisp until 1962.
And, more egregiously, the article lists closures. In fact the first Lisp with closures was Scheme in the 1970s. And it didn't invent them - the idea appeared in Pascal first. (Though because it lacked true garbage collection, Pascal only allowed you to pass closures into functions, and not return them. this greatly limited their utility.)
To demonstrate how much those features are not core to Lisp, one of the most widely used Lisp applications is emacs. But it did not get support lexical scope or closures until 2012!
- agumonkey 4y agoThere are mails of mccarthy's team discussing upward funargs and lexical scoping in 59 (maybe 58, I don't recall). The very first to do it publicly might have been algol, but it's not clear who made it first.
- deadbeeves 4y agoIt doesn't mention static typing at all. It only mentions static scoping. In fact, the article credits to Lisp dynamic typing. Also, the article doesn't credit any specific features to McCarthy. It credits to him Lisp itself and the idea that both code and data can be represented as lists, and then it credits to Lisp the invention of certain features, like first-class functions, garbage collection, etc. I don't think the article intends to imply some transitivity of credit.
- deleted 4y ago[deleted]
- lispm 4y agoStatic typing isn't mentioned at all in the paper. The article talks about "functions as first-class objects (closures) with static scoping". Those appeared as a general construct in Scheme and only later in Lisp. The idea of functions and an environment is a bit older (see for example Landin's ISWIM from 1964 -> https://en.wikipedia.org/wiki/SECD_machine https://en.wikipedia.org/wiki/SECD_machine ). The idea thus did not appear in Pascal first, if at all. "first class closures" means that functions can be freely passed to functions, returned from functions and assigned/reassigned in data structures. Scheme for example can store functions in vectors & lists and return those from functions. PASCAL did not have anything like that in 1970 (The programming language Pascal, Niklaus Wirth, 1970 https://www.research-collection.ethz.ch/handle/20.500.11850/68712 https://www.research-collection.ethz.ch/handle/20.500.11850/... ). I would also doubt that PASCAL in 1970 had downward closures. One could pass functions & procedures as arguments (not as part of other data structures), but could I use non-local variables? There seemed to be a restriction for recursive functions that they could only use local variables. I would then not expect that this would be much different for passed functions.
- wrycoder 4y agoBut Scheme dates from 1975.
- lispm 4y agoCorrect, among Lisp dialects, Scheme had general lexically scoped functions as first class objects first - 75. Lisp got it later. Scheme was first implemented on top of Maclisp at that time. https://en.wikisource.org/wiki/Scheme:_An_Interpreter_for_Extended_Lambda_Calculus/Section_5 https://en.wikisource.org/wiki/Scheme:_An_Interpreter_for_Ex... Pascal didn't have anything like that.