3 ms·
What part of the code that will compile under this simple compiler (i.e. `(+ 2 (+ 3 4))`) _doesn't_ have lisp semantics?
by fao_ 8y ago
What part of the code that will compile under this simple compiler (i.e. `(+ 2 (+ 3 4))`) _doesn't_ have lisp semantics?
- samsaga2 8y agoLisp uses S-expressions but not all the S-expressions are lisp. If you cannot define functions with free variables then is not lisp.
- junke 8y agoInteger overflow.
- kazinator 8y agoNot all historic dialects of Lisp have bignum integers. I don't know what the current situation is in Emacs Lisp, but it had only fixnums at one point.
- imglorp 8y agoEval... as in REPL, is tough without an interpreter in process.
- kazinator 8y agoI would say this: - tokens are just collections of non-space characters, passed raw through to an assembler, where it is assumed that they denote machine words. Whatever happens, happens. The "symbol" eax will refer to a register, for instance. (If this project had stuck with AT&T assembly syntax, at least that would have been qualified as %eax%). - functions aren't registered under Lisp symbols but are just global references to assembly-language labels. It seems we can just do (1234 4) and it will just call address 1234. - no LIS)t P)rocessing to be seen here. That said, there is no language that is just "Lisp", and so there is no prescribed set of semantics. We can make a prefix expression preprocessor for x86 assembly language and call it "Phil Lisp" (or whatever qualifier).