3 ms·
Another useful article helping understand how lisps work is http://www.michaelnielsen.org/ddi/lisp-as-the-maxwells-equations-of-software/ http://www.michaelniel
by avmich 8y ago
Another useful article helping understand how lisps work is http://www.michaelnielsen.org/ddi/lisp-as-the-maxwells-equations-of-software/ http://www.michaelnielsen.org/ddi/lisp-as-the-maxwells-equat... .
There are three important data types in these interpreters. Of course they all can be created, but conceptually you'll need them.
First type is the atom - initially you need a symbol, then you can add a number and a string as a kind of an atom.
Second type is the list - the way to aggregate data, to allow more complex structures, like trees and association lists.
Third type is the function. In many simple lisp implementations the function type is taken from the language in which lisp interpreter is implemented. Norvig's Jscheme shows how to implement the function manually.
A bunch of high level concepts are of course omitted - there are no macros, continuations, tail recursion optimization, garbage collection is often taken from the host language etc. - but still it's a capable model.