by gdi2290 on 12/24/15, 5:29 PM with 23 comments
by ane on 12/24/15, 5:58 PM
by lisper on 12/25/15, 2:34 AM
The characteristic that defines a Lisp is that code is not a sequence of characters, it's a data structure -- typically a tree of cons cells -- which can be manipulated within the language itself. The language being defined here doesn't have that property.
It is this property that allows you to write macros, which is what makes Lisp cool. Without it you don't have Lisp, you just have a run-of-the-mill programming language with weird syntax.
by sinamdar on 12/24/15, 11:09 PM
Inspired by Peter Norvig's 'How to write a Lisp Interpreter in Python', I created three variants of it along the same lines as the OP. The first is a Simple Lisp Interpreter in Javascript [1]. The second separates Syntactic Analysis from Execution [2]. And the third supports non deterministic computing [3].
[1] https://bitbucket.org/sainamdar/lisp2js
by wtbob on 12/24/15, 7:22 PM
It's okay if your target language already supports non-local exits, particularly parameterised ones (although even that can be faked with a well-designed global), but if it doesn't then it's a pain (imagine how you'd do it in Go: every single function call will return an additional value, indicating if a non-local exit is intended).
Alternatively, imagine trying to transpile call/cc to JavaScript…
by tlack on 12/24/15, 6:07 PM
by Scotups on 12/24/15, 6:06 PM