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

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

Date: Tue, 26 Jan 2010 08:34:57 +0000

To: Ben Gamari

Cc: notmuch

From: Simon Cozens

On 26/01/2010 03:30, Ben Gamari wrote:
> I know practically nothing about writing Perl bindings,

I recommend ;)

> but it seems
> like this might be work better left to a bindings generator. I currently
> have a patch which enables binding generation through SWIG. It works
> well, although SWIG unfortunately doesn't have very good support for
> exposing object-oriented C interfaces like notmuchs' through the target
> language's type system.

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.)

I guess the advantage of SWIG is that it gets you code that you don't
want in many different languages.

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.