3 ms·
Why not a single example of actual macro definitions? The reader is only shown what they're replacing and how they might be used. > When I was still researchi
by 3np 4y ago
Why not a single example of actual macro definitions?
The reader is only shown what they're replacing and how they might be used.
> When I was still researching this fabled obscure language called Lisp one thing people kept saying about it is that “Lisp is a programmable programming language”, but I could never figure out what they meant by that.
Somehow I feel they fell into the same trap.
- reikonomusha 4y agoI think the usual reservation is that once you start showing how to write macros, it only follows with more questions. What's the syntax? What is quasiquoting? What is an unquote? Are arguments evaluated? Why not? What's code and what's data? How is it that a singly linked list data structure has anything to do with code that's executed? ...at which point it's almost more economical to just read a book about Lisp. I think showing what instead of how can be instructive and motivating for some readers, but it definitely doesn't satisfy all of them.
- smcl 4y agoI think this happens with a few interesting programming concepts. Haskell has its monads (person learns Haskell, gets excited when they start to grok monads, write a blog post explaining it in terms that make sense to them) and Lisp has macros (person learns Lisp, gets excited by macros, writes a blog post about it in a way that makes sense to them). It's sort of a rite of passage, only reason I don't have a monad blog post is because I made it too long so it sat for ages in my drafts and I lost the motivation to complete it :)