ptkwt
10/7/2004 4:54:00 PM
In article <5h99d.29153$H11.906124@twister1.libero.it>,
gabriele renzi <rff_rff@remove-yahoo.it> wrote:
>Martin DeMello ha scritto:
>
>> I asked this in the middle of another thread but it appears to have been
>> lost in the noise. Assuming your library has already exposed a C AP,
>> does SWIG (or hand-writing C bindings) have any advantages over Ruby/DL?
>
>well, actually I think you can write a SWIG backend that generates
>Ruby/DL code... trhat would be cool :)
That's an interesting idea.
>
>> The latter seems to be a far simpler way to do things, and I'm wondering
>> why it's not more widely used.
>
>little documentation and has been around for less time I guess, plus not
>automated way to do things (I mean, swig)
Ruby/DL isn't as well documented, especially for dealing with C++ issues.
Isn't a shared lib produced from C++ problematic for Ruby/DL because of the
name mangling issues?
Another difference:
You can only use SWIG when you've got the sourcecode to a library, whereas
you could use Ruby/DL in a case where you have API documentation for a
shared-lib, but no source code.
Phil