4 ms·
I loved the idea of code generation when I first encountered it, but I've since come to hate it. A large code base that was auto-generated and then subtly modi
by lovasoa 3y ago
I loved the idea of code generation when I first encountered it, but I've since come to hate it.
A large code base that was auto-generated and then subtly modified in some places is hard to refactor, and if you need to change the signature of a function that is used thousands of time across the generated code, you are in for a long ride.
- deterministic 3y agoThere is an art to writing good code generators. Bad code generators are really really bad. Good code generators are absolutely awesome! I have saved thousands of hours using my own code generators. But I have also seen very bad code generators in the wild that I wouldn’t recommend using.
- dgb23 3y agoYes it’s easy to go overboard with it. I don’t have a clear recipe for which parts it makes sense, except that it emerges from hand written code.