2 ms·
#pragmas are not portable, and have various problems with compatibility. Structured comments could work, but because the C++ compiler doesn't parse them, you e
by mountain_lion 9y ago
#pragmas are not portable, and have various problems with compatibility.
Structured comments could work, but because the C++ compiler doesn't parse them, you essentially have a file-with-a-file, and 80% of the problems you encounter with the dual-file system.
You also have the problem of the API's client trying to understand what the API looks like. We don't want to make them read C++ code in any way, and a pyclif file looks a lot like python.
Finally, CLIF is substantially more terse than SWIG--on the order of 1/10th the number of lines. This makes it less of a big deal to have a separate file.