3 ms·
definitely code generation breaks similar things to the preprocessor, but it's got a different set of trade-offs. basically the generated code is there to look
by dilap 11y ago
definitely code generation breaks similar things to the preprocessor, but it's got a different set of trade-offs. basically the generated code is there to look at, so rename refactors or jump-to-definition or what have you will work reliably, until you regenerate the code. depending on how the code regeneration works (is it just annotations of existing code?), maybe the regenerated code will work and match the code definition.
from past experience, i view code generation with a healthy amount of skepticism, for the same reasons i'm skeptical of the preprocessor! it's cool, it's powerful, you lose out on a lot.
my impression/experience of go is that codegen is still not widespread. (i haven't seen it much, anyway.)