3 ms·
I used Swig to connect our C++ API to Ruby back in... '02 (wow, so 21 years ago, time flies!). It worked great. We could try things out in IRB (the Ruby REPL) a
by UncleOxidant 3y ago
I used Swig to connect our C++ API to Ruby back in... '02 (wow, so 21 years ago, time flies!). It worked great. We could try things out in IRB (the Ruby REPL) and it allowed us to quickly write unit tests in Ruby (this was well before things like gtest).
There are probably better/easier ways to do that now, but back then Swig was the only game in town and for us it worked out pretty well.
- kccqzy 3y agoReminded me of the time when I had to write a piece performance-sensitive code in C++ but I decided that unit tests are not performance sensitive so I wrote them in Go. Naturally I used SWIG. It worked quite well since the C++ code exposed a very simple interface. I thought I could leave it that way until one day a manager came and questioned why we had terrible unit test coverage. It turned out we had separate tools for measuring code coverage in C++ and Go and it was impossible to make them work together.