Re:Show HN: Gojay – Performant JSON encoder/decoder for Golang
by phamilton on Sunday May 20, 2018 @10:03PM
(#17115746)
> C/C++ macros
I'd argue that those aren't first class macros. C macros are just source manipulators, and C++ templates (I'm not super experienced with them so forgive come if I'm way off) don't really manipulate the AST, it's more a type system with compile time resolution.
That's because quasiquote and similar operators let you debug code, not code that generates code.
What I've found is that you can debug the generated code to debug the code generator. Code generators shouldn't be used to do something terribly complicated. I'd agree with you that code generators doing complicated things is a code smell. Leave those to native syntax, provided it's not as badly thought out as templates.