3 ms·
I know SWIG stopped being cool long, long time ago, but it does still appear pretty easy to use [1], and has the advantage of being able to target multiple lang
by emmanueloga_ 6y ago
I know SWIG stopped being cool long, long time ago, but it does still appear pretty easy to use [1], and has the advantage of being able to target multiple languages.
I get the feeling ppl don't use it mostly because of the "uncool" factor...
Would you use SWIG to extend python or other languages? Why or why not?
1: https://www.geeksforgeeks.org/wrapping-cc-python-using-swig-set-1/ https://www.geeksforgeeks.org/wrapping-cc-python-using-swig-...
- black_puppydog 6y agoI used SWIG once a long time ago, for a project that did actually target multiple languages. I got burned so bad that I ditched all efforts at automatic binding generations from there on out. Debugging this thing was impossible (to me, a long long time ago) and I ended up writing manual bindings to python & matlab instead. Those two were the important targets anyhow, and it allowed me to really think through how I exposed & handed over the different chunks of memory being allocated in the native code.
- Uberphallus 6y agoAFAIK SWIG doens't support PyPy (or IronPython, etc), which is one of the core motivations for HPy.