11 ms·
> Modules on the other hand are more strict and would likely have made the job of writing language bindings easier and more predictable. There's two ways for t
by lelanthran 3y ago
> Modules on the other hand are more strict and would likely have made the job of writing language bindings easier and more predictable.
There's two ways for tooling like swig to work with modules:
1. Read the compiled module and generate the stubs to call into it.
2. Read the source code for the module and generate the stubs for it.
Which of those, do you think, is easier than reading C (not C++) header files?
- dagmx 3y agoReading the module information would be significantly easier. (which is not something swig can do today since swig hasn’t been updated in a while ) Parsing code to define an API is horribly fragile. A single macro or unknown keyword can break it. Hence why you had to specify C not C++ headers. Having a statically defined metadata like C++ modules do would have greatly simplified binding generation