by lispm · 4y ago · 0 comments
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 ). 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/... ).
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.
https://en.wikisource.org/wiki/Scheme:_An_Interpreter_for_Ex...
Pascal didn't have anything like that.