4 ms·
It might sound cliche by now, but I think you can glean a whole lot from the book Practical Common Lisp, by Peter Seibel. It's one of those books I learned fro
by ksaj 7y ago
It might sound cliche by now, but I think you can glean a whole lot from the book Practical Common Lisp, by Peter Seibel.
It's one of those books I learned from online, but I like it so much and kept on returning to it. So I bought a copy, and I still read it and write notes in the margins. It's that good. I don't call many things "bibles" but PCL is pretty much the Common Lisp bible. And it is as practical as the title suggests (as per your request!)
Chapters 7 and 8 are both entirely about Lisp macros. But even then you aren't done with learning about macros yet. The natural progression of the book means you keep building on the prior concepts until the last chapter.
Of course, the CD database you create while working through the book is a tad naive, but the idea isn't to make a commercially viable application - it is to demonstrate Lisp thoroughly by creating apps right from the get-go. And you would do exactly the same things in a commercial setting.
PS: It's Common Lisp and not Clojure. But you were asking about macros specifically, and the Lisp flavour doesn't matter much at all when it comes to how macros work. This book will lead you in the right direction.