[notmuch] [PATCH] Mail::Notmuch Perl wrapper

Ben Gamari bgamari at gmail.com
Tue Jan 26 07:51:45 PST 2010


Excerpts from Simon Cozens's message of Tue Jan 26 03:34:57 -0500 2010:
> 
> Yes, this is why I chose not to use SWIG: if I'm going to automatically
> get code that doesn't do what I want and then have to manually write
> code that does, why not just manually write code that does? (well,
> semi-manually: xsubpp extracted all the function signatures for me.)
> 
You bring up a very good point here. It seems like Perl is nice in that
it has tools that allow you to easily bring up a set of bindings.
Unfortunately, it seems that many other languages (Python included)
aren't as well endowed.

> I guess the advantage of SWIG is that it gets you code that you don't
> want in many different languages.
> 
This is actually precisely my logic. It saves you the work of having to
do the grunt work of writing the glue for each of the signatures.
However, it seems that in some languages this isn't nearly as difficult.

> Anyway, whichever way you do it, you'll still need the class
> documentation and the tests - feel free to take them from my patch if
> you end up going the SWIG route for Perl.
> 
You might have the right approach in not choosing a cookie-cutter
solution for binding generation. There certainly are tools[1][2][3] for
Python that make the job a great deal easier. Maybe these would be a
better choice. Ultimately, we'd probably end up with more code to
maintain, however the end result would likely be cleaner than the
current stacked bindings approach. What do people think?

- Ben

[1] http://www.cython.org/
[2] http://freshmeat.net/projects/python-sip/
[3] http://code.google.com/p/pybindgen/


More information about the notmuch mailing list