86 points · by swatson741 · 4y ago · 33 comments
I suppose it needs:
* car and cdr
* if
* list
* eval
* quoting and quasiquoting
What else?
A lot of people mean Common Lisp when they say "Lisp".
One of the dividing lines of most Lisps, is whether they fall into Lisp-1, or Lisp-2 [2]. That is, do functions and variables share a namespace or not. Common Lisp is a Lisp-2, whereas Scheme is a Lisp-1.
[0] https://www.gnu.org/software/mit-scheme/documentation/stable...
[1] http://www.lispworks.com/documentation/lw50/CLHS/Front/index...
[2] https://en.wikipedia.org/wiki/Common_Lisp#The_function_names...
[0] https://matt.might.net/articles/compiling-up-to-lambda-calcu...
—edit—
This article has a good example in the ‘core language’ section -> https://matt.might.net/articles/desugaring-scheme/
Quasiquoting means creating a list where some elements are evaluated at runtime. Not dissimilar to string interpolation.
Take a look at the awesome 'Make A Lisp' (MAL), in particular the section on quoting:
https://github.com/kanaka/mal/blob/master/process/guide.md#s...
This has a fairly good description of what happens during quasi-quoting.
Quote
Atom
Eq
Car
Cdr
Cons
Cond
Lambda
Label- Tail call optimization
- Closures
Excellent point! Compiling Lambda Calculus is a bit like this. It starts with Lambda Calculus and then develops multiple implementations of increasing complexity. LISP from Nothing also does this, but it is about ancient LISP.
I will definitely keep this in mind!