Today in cursed C code:
void foo(int32_t int32_t, int32_t bar);
Since C puts identifiers and typedefs in the same namespace, this code just produces a confusing compile error about the type of bar!
(This occurred in some real code after macro expansion.)
miniblog.
Related Posts
TIL eager macro expansion can mean very different things.
Rust macros must expand to valid code, so eager macro expansion allows illegal intermediate states: https://docs.rs/eager/0.1.0/eager/macro.eager.html#macro-expansions
Elisp macros are expanded at runtime unless expansion is eager:
Common Lisp has a type of macro that I've never seen before, called a 'symbol macro'. This is like a normal macro, where you define an expansion for a symbol, but if the symbol is let-bound, it stays as a plain variable!
https://clhs.lisp.se/Body/m_defi_1.htm
Fantastic practical example of lisp macros, complete with examples of expansion: http://t.co/7jPdFgDPWQ