3 ms·
eval[0]. Originally written by John McCarthy to define LISP, it has had massive influence over the implementation of all interpreted and dynamic languages. [0]
by Zambyte 3y ago
eval[0]. Originally written by John McCarthy to define LISP, it has had massive influence over the implementation of all interpreted and dynamic languages.
[0]: https://web.archive.org/web/20130319041327/http://www-formal.stanford.edu/jmc/recursive/node3.html https://web.archive.org/web/20130319041327/http://www-formal... - this is a link directly to the page that has eval on it, but the rest of the paper leading up to it is important to really understand what's going on.
- kazinator 3y agoMacCarthy described EVAL as a theoretical entity; it was Steve Russel who said he would code it. MacCarthy was surprised and said that Russel is misunderstanding it; it's just a theoretical description, not code. But Russel basically hand-translated the calls into assembly code and got an interpreter out of it. An interpreter written in Lisp cannot be executed if you don't already have an existing interpreter to run it. The key insight that we can describe the interpreter in Lisp, and then somehow compile it into code belongs to Russel. Eventually it became possible to do that by machine: when you have a Lisp compiler, the Lisp-in-Lisp interpreter can be compiled by machine rather than by hand.