From: gga Date: 2005-04-02T12:59:43+09:00 Subject: Re: Getting Ruby approved Depends on what you compare against. Against the basic C apis of the languages... Compared to Perl: no point of comparison. Perl uses a pseudo C language wrapper called XS that is plain and simply a nightmare to learn, code for and maintain. Compared to Python: very similar to ruby, but I prefer ruby. The ruby api is much simpler as there is no need for reference counting (albeit marking your own classes for the GC is also kind of a big pain in ruby). The ruby macros used are also a tad shorter and probably a tad easier to learn and memorize than all the Py* methods. Python, however, is infinitely better if you ever need to wrap a library that uses multiple inheritance, as the lack of MI in ruby may prove to be too much of a headache in that case. Against SWIG... Perl is the most mature SWIG api, albeit SWIG's python support has more or less now become the predominant implementation. SWIG's ruby is still rather new and still has a couple of gotchas here and there (mainly with C++ and overloaded functions, for example). That being said, the fact that SWIG's ruby can throw away all the shadow classes that are needed to have stuff be swigged in those other languages makes it a) much nicer, and b) potentially faster in the future than other SWIGs. Ruby SWIG is also trying hard to support multiple inheritance thru modules, albeit the feature is still in development. Against Boost Python: Ruby has nothing equivalent. I consider this a good thing. Boost Python is a good idea, but it just pushes the limit of what C++ compilers can handle with templates and this, imo, currently leads to both inefficient and hard to maintain/debug code. Against Pyrex: Ruby has nothing equivalent. Pyrex is somewhat akin to a slightly more high-level version of ruby's DL module, but nowhere near as good as SWIG. Still not clear to me why would you use it at all, other than you prefer the cleaner python syntax wrapping to writing pseudo C files as you do with swig.