4 ms·
To introduce programmers used to a C-like syntax to Lisp, I like to show how s-expressions are really just ASTs. Write a small function in C, show what the AST
by scott_s 18y ago
To introduce programmers used to a C-like syntax to Lisp, I like to show how s-expressions are really just ASTs. Write a small function in C, show what the AST for it looks like, and then show the Lisp verison. The mapping should be obvious.
I've seen plenty of introductions to Lisp talk about the code-data equivalence, but most don't explicitly say that writing Lisp is the same as writing your programs directly as ASTs.
Disclaimer: I only dabble in Lisp.