3 ms·
Metaprogramming in Lisp is easier than in other languages I've used (though I tend to use Scheme, not CL). Grokking apply/eval and the code-is-data nature of th
by sago 10y ago
Metaprogramming in Lisp is easier than in other languages I've used (though I tend to use Scheme, not CL). Grokking apply/eval and the code-is-data nature of the lambda calculus is the key enlightenment. I stopped thinking of metaprogramming as some weird esoteric edge-case and started using it to solve problems. I mean I write tools to help me write code in all languages, to some extent, but in Scheme it is ubiquitous.
I went to Haskell from Lisps, and found quite a lot of similarity there, so if you're fluent Haskell, you might not find anything particularly revelatory. Though Haskell's more strict nature makes it much harder, in my experience, so I do it less often.
Eval/apply is a different model of code than imperative languages, which can be 'mindblowing' if you've only thought of languages as higher level assembly.
I do love Scheme, but I struggle to justify using it in practice. Which is telling I think.