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

Yes, the usefulness of macros always has to be balanced against their cost. I know of only one codebase that does this particular thing though, Emacs. It is used to define Lisp functions that are implemented in C.


It's a common pattern for just about any binding of C-implementation to a higher-level language. Python has a similar pattern, and I once had to re-invent it from scratch (not knowing any of this) for a game engine.




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

Search: