3 ms·
Both pybind11 and boost::python involve writing code. This solution doesn't, save for listing the names of the files to be made available to Python (or C#, or E
by atilaneves 7y ago
Both pybind11 and boost::python involve writing code. This solution doesn't, save for listing the names of the files to be made available to Python (or C#, or Excel, or...).
- oefrha 7y agoNeither ctypes nor cffi involves writing glue code. In fact you don’t even need another source file, let alone a whole other language toolchain (wait, you actually need two other source files plus your third-party dpp library).
- bachmeier 7y agoI'm not sure I understand your comment. Someone said they use pybind11, someone responded to that by saying pybind11 requires writing code, and you responded by saying ctypes and cffi don't. How is that relevant to a discussion of pybind11?
- oefrha 7y agoOP presents their solution as an “easy” solution that doesn’t require glue code. Except there are already established native solutions that actually don’t require glue code.
- loeg 7y agoIn what sense does ctypes not require writing glue code?
- oefrha 7y agoSure, I’ll be more specific: there’s no glue code for function calls. Whatever function you want to call doesn’t need to be declared up front, you just call it at runtime, and it’s looked up dynamically. However, data structures like arrays and structs need to be declared, if needed.
- atilaneves 7y agoSo... ctypes requires writing glue code. The solution in the article doesn't. "if needed" means "needed with any and all C APIs one would be interested in".