2 ms·
Static 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
by lispm 4y ago
Static 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.