Re:Greppability is an underrated code metric
by db48x on Tuesday September 03, 2024 @07:07AM
(#41433604)
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.
[ Parent
| on HN ]
Re:Greppability is an underrated code metric
by shadowgovt on Tuesday September 03, 2024 @10:37AM
(#41435404)
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.