4 ms·
No it isn't. If you did down enough, you'll find some form of code generation in your environment of choice. If nothing else, compilers, but it's not limited t
by outworlder 6y ago
No it isn't.
If you did down enough, you'll find some form of code generation in your environment of choice. If nothing else, compilers, but it's not limited to them.
The largest difference between that and copypasta is - generated code can be easily updated, by regenerating it.
It's also an implementation detail. I've read elsewhere in this thread that code generation is bad and language supported features are good. I'm not sure it's so clear cut. It shouldn't matter if the generated code is mostly invisible (when it's baked inside your binary by the compiler, due to language support), versus code that is generated in the source language and then compiled.
One thing that's always bad is mixing generated and non-generated code. You have all the disadvantages and little benefit.