It's just equivalent to a preprocessor.
It's just equivalent to a preprocessor.
A small one-off run under your control is an exception. But people learn to fear the thing, and apply that fear everywhere.
> A small one-off run under your control is an exception. But people learn to fear the thing, and apply that fear everywhere.
Why does it usually suck? Writing code that writes code seems like an optimization that would bolster productivity.
One large factor is that when somebody really dislike the result of a code generator, they most commonly cope by editing the generated code by hand. With other metaprogramming techniques people can't do the same, so they fix the issues.
The end result is that code generators are usually a set of mostly-functioning tools that create bad code that is almost, but not exactly impossible to understand but that you will be required to change at some point.