zkat / ama

Ask me anything!
https://blog.sindresorhus.com/answering-anything-678ce5623798
11 stars 0 forks source link

What is the coolest macro you've ever written? #2

Closed MysteryMachine closed 8 years ago

MysteryMachine commented 8 years ago

Whenever a LISP programmer gets to write a non-trivial macro, it is a damn good day for them. What is the coolest thing you've used a macro to do?

zkat commented 8 years ago

The thing about macro writing is that if the macro itself is big and complicated, you're probably doing it wrong. Often, good macros get broken down into syntax sugar for more interesting functionality.

That said, maybe one of these: