Hacker News new | ask | show | jobs
by robmccoll 2276 days ago
It seems like when working with generators, the trick is to have the right boundaries between generated code, points where you can extend the generated code, and the API through which you use the generated code. If successful, you should never feel the need to hand edit the generated code itself, and you shouldn't need to worry too much about re-running the generator breaking things or stomping on your code.
1 comments

>> you shouldn't need to worry too much about re-running the generator breaking things or stomping on your code.

Can't agree more! There are code parsers which give out a DOM and then code can be manipulated. But is a bit of work. We are trying this concept in our framework.