Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Dunno about the Clojure communtity but for Emacs Lisp and Common Lisp there are certain broadly accepted idioms where macros are accepted:

1. "with-context", where there is a need to control resource allocation/deallocation or things in the context of code in question. 2. use-package dsl that simplify configuration in a predictable way 3. object definition helpersresource

Then, there are core language extensions and std libraries suggested for the main implementation. This is where macros are fine as they always get good documentation and plenty of additional eyeballs.



Fully agreed with your examples. As a rule of thumb macros should be kept inside libraries, not application code.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: