[C++-sig] SWIG vs Pyste (was: Re: [Implementation] Calling wrapped functions, converters, policies)
Niall Douglas
s_sourceforge at nedprod.com
Sat Sep 20 02:47:55 CEST 2003
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 20 Sep 2003 at 3:48, Prabhu Ramachandran wrote:
> ND> I've gone further though and have a python script which scans
> ND> the include directory of the C++ library, generates a pyste
> ND> file for each one which has changed since last invocation ND>
> using a customisable rule set defining differences and then ND>
> invokes pyste. This means the total maintanence cost is merely ND>
> maintaining the return policies file - everything else is ND>
> totally automated.
>
> Interesting, but what prevents you from generating SWIG interface
> files in similar manner?
Because getting python to parse C++ is tough. Boost.Python & Pyste
does that for you with a real C++ compiler.
> ND> I should also that I haven't looked at SWIG in the last few
> ND> months and when I did, it was purely in evaluation terms - not
> ND> for serious bashing. So I may be wrong, but I'm pretty sure as
> ND> a general rule I'm right.
>
> Well, in my personal evaluation I've been a more successful with SWIG
> in less time than with Pyste. I've wrapped about 90 odd classes.
> Sure, the code I've wrapped is *nowhere* near as complex as the Boost
> library but its something and a decent data point for me. This is not
> to say that Boost.Python is not good enough, its probably just me but
> hey I would not be on this list if I didn't think highly of
> Boost.Python and Pyste. The only reason I am replying on this thread
> is that I think you are being a little too dismissive of SWIG and that
> goes against my (admittedly limited) experience.
I should clarify my statements then - I completely agree that SWIG is
an excellent tool and for years has provided and still provides the
optimum way of generating cross-language bindings. I cannot praise
the tool enough.
What I was doing was saying why I personally chose Boost.Python over
SWIG based on the needs of this particular library. I did not intend
to diss SWIG or say it was inferior. In fact I most certainly would
not choose Boost.Python for other solutions because in those SWIG is
stronger and more importantly, I actually understand SWIG and how it
works whereas all this metaprogramming stuff is still beyond me. And
I find it very frustrating working with software which I don't
understand :(
Cheers,
Niall
-----BEGIN PGP SIGNATURE-----
Version: idw's PGP-Frontend 4.9.6.1 / 9-2003 + PGP 8.0.2
iQA/AwUBP2uju8EcvDLFGKbPEQIeWQCgjw+pzyAMEwM/Nd3m7PB8y/ZTM4EAn1iV
k9J7+SMtv8oy/MPw31/NaZPr
=clxU
-----END PGP SIGNATURE-----
More information about the Cplusplus-sig
mailing list