Sigh. I was hoping for a lengthy debate with much deliberation on either side. (no not really)
Can this be just a collection of predefined templates shipped with Nunavut? We could put them somewhere under nunavut/src/nunavut at main · OpenCyphal/nunavut · GitHub with a subfolder per language. Basically, all this would move under nunavut/predefined_templates/python
: https://github.com/UAVCAN/pyuavcan/tree/uavcan-v1.0/pyuavcan/dsdl/_templates
Come to think of it, the above might be insufficient, because looking at the PyUAVCAN code generator I see that there is like a hundred lines of logic around the templates that appear quite necessary: https://github.com/UAVCAN/pyuavcan/blob/uavcan-v1.0/pyuavcan/dsdl/_compiler.py. So maybe instead of templates we could ship dedicated Python modules that can be also run as CLI tools, one per target language? nnvg-python
, nnvg-cpp
, etc.
I don’t yet know.
When the ancient proto-civilizations first invented the C language, they certainly did not plan for such use. This is confirmed by a recent discovery of a cave painting which said (my translation into modern English may be imperfect) that the lack of an adequate object model and namespacing in C makes it unfit for use with DSDL.