I agree with most of the points.
The most interesting point to be discussed is whether we do:
- K0: inplace generation (like clang-format)
- K1 complete generation
When we have a case where things are completely self contained, then I agree that having K1 (and not checking in the code) could be the right way.
On the other hand, the reality is that:
- We cannot do a quick complete switch, as most of the objects are manually written and it is desirable to have a gradual path of migration.
- There are other member functions which are already written in Node or Ref, and they need to be added.
One valid concern of checking in generated code is the consistency and git history. If the generated code is quite complicated (like parser generator) then I agree it would be a concern. In this case, our goal is to have readable code being generated. Additionally, running the generator like clang-format in the linting stage would address the consistency issue.
So in summary, I would view the tool as more like an developer auxiliary tool (like clang-format), rather than a generator. This view would also allows us to gradually opt-in generation, while still manually write objects in cases that are necessary.