I mostly did this for fun, but I think swig sometimes gives you slightly unnatural feeling interfaces, because you’re focussing too much on mapping C++ classes to your ruby classes. For example some liblinear methods take a
struct param argument. liblinear-ruby-swig mirrors this by proving an LParameter class that maps onto this:
but I’d rather write:
I imagine that SWIG must incur some sort of overhead but I would have thought that was pretty negligible for something like liblinear where most of the heavy lifting happens in the library being wrapped.