Hi @jcf94,
First, this is not only for C++ code generation. In the future, we will extend it for Python/Rust code generation, which is helpful for unifying object definitions between different languages.
Second, some object fields is hard to fill in even for advanced users, e.g, type_child_slots
, which is the number of object’s children.
And last but not least, by defining objects with tschema, we will have more in-memory information about the object itself. For example, the type hierarchy between objects, the memory layout of an object, etc. This will enable more compilation optimization in the TIR and help us improve TIR’s type system (my next step).
Since we will keep the generated C++ code in the codebase, it will not make any difference with current code in terms of code navigation.