> Why isn't code-generation improved so it *can* be done via code-generation
> instead?
There are plenty of cases to specify the user-defined types. Handling each of them automatically (i.e. generate the correct create_* function call to create the type) is not worth it for the 2 functions that we have _in the core_ that require this. I don't think there will be a lot more such functions in the core with user-defined return types. Hence, doing it manually seems to be the right thing to me.
> Why isn't code-generation improved so it *can* be done via code-generation
> instead?
There are plenty of cases to specify the user-defined types. Handling each of them automatically (i.e. generate the correct create_* function call to create the type) is not worth it for the 2 functions that we have _in the core_ that require this. I don't think there will be a lot more such functions in the core with user-defined return types. Hence, doing it manually seems to be the right thing to me.