chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] swig


From: Felix
Subject: Re: [Chicken-users] swig
Date: Wed, 01 Dec 2010 21:41:40 +0100 (CET)

From: Thomas Chust <address@hidden>
Subject: Re: [Chicken-users] swig
Date: Wed, 1 Dec 2010 16:05:47 +0100

> 2010/12/1 Peter Bex <address@hidden>:
>> [...]
>> I never really got the point of Swig; what does it do that you can't
>> use the FFI or the bind egg for?
>> [...]
> 
> Hello,
> 
> I can think of two advantages SWIG has: It is relatively easy to
> create bindings for several different scripting languages from the
> same interface definition. And in contrast to most FFIs I know it is
> relatively easy to create wrappers for C++ libraries even if you need
> advanced features like inheritance chains crossing the language
> boundaries.
> 

Yes, SWIG is very powerful. It's also an insanely complicated beast,
and (at least it makes the impression to me) needs very long to study
and to be understood to write backends for. Keeping these backends
up-to-date is a demanding job, and, unless you have someone affiliated
with the project who does this, the backends bitrot very quickly.

I think SWIG is somewhat overdesigned and using it adds a dependency
that may be annoying. So I recommend to use bind or hand-written
wrappers (macros to the rescue!), unless you really really need
something more capable.


cheers,
felix



reply via email to

[Prev in Thread] Current Thread [Next in Thread]