Although I like how robust @areusch’s design is, I’m not sure we need an IR. It seems like we could just skip the parser -> IR step and go straight from schema to language-specific generator. Isn’t this how all other similar projects work (protobuf, cap’n proto)?
If we still want to go the schema -> parser -> ir -> language-specific generator route, why don’t we just start with the IR -> language-specific generator part? That way we can get something working and see what the pain points are.
Regarding the python schema here are some issues I foresee:
- How do we add documentation to fields
- How do we add attributes to fields I’m still against using Python here. I think it will be easy to get trapped by the limitations of the python AST when we want to add features in the future.