3 ms·
How can I become really good at Lisp programming? Write an application big enough that you can make the lower levels into a language layer. Embedded languages
by WalterGR 9y ago
How can I become really good at Lisp programming?
Write an application big enough that you can make the lower levels into a language layer. Embedded languages (or as they now seem to be called, DSLs) are the essence of Lisp hacking.
When I think about Clojure, the "layers of languages" metaphor doesn't spring to mind.
Can anyone familiar with the language describe how well the metaphor holds for it? Also, is there a difference in how well it holds for how Clojure is presented and used in practice, vs. what's technically possible in the language?
- eigenhombre 9y agoClojure is an opinionated Lisp whose focus on simplicity, and orientation around data, may draw people away from the nested language approach. You certainly can use macros to build DSLs in Clojure (the Midje and Korma libraries make heavy use for them, for example). But over-heavy use of macros is discouraged when common library functions operating on simple data structures will do. For a very different approach which feels much more aligned w/ PG's comment, have a look at Norvig's "Paradigms of AI Programming: Case Studies in Common Lisp." Reading it changed my notion of what Lisp is / can be; you can write Clojure programs that look similar, but it seems to be rare to do so.