[Parted-edge] Language bindings.

David Cantrell dcantrell at redhat.com
Thu Feb 15 23:31:25 CET 2007


On Fri, 2007-02-16 at 03:47 +0530, Debarshi Ray wrote:
> http://parted.alioth.debian.org/cgi-bin/trac.cgi/wiki/PlanningEdge
> 
> What is the consensus on "Multiple language bindings for libparted"?
> Based on some IRC conversations with Anant, David and Otavio we
> decided on these options:
> 
> a. Use an available automatic binding generator like SWIG to generate
> the bindings. To reduce the dependancy on SWIG, we provide the
> bindings in the release tarball instead of building at compile time.

I've been working with SWIG lately on a few side projects and have been
less-than-impressed with the automatically generated bindings.  I would
much prefer having hand-written bindings.

> There were a few grey areas like how to provide the basic 1 to 1
> bindings, and the object-oriented bindings on top of them. A special
> case is that of the C++ bindings. Since libparted is already natively
> in C, how do we do the C++ bindings? Libpartedpp
> (http://savannah.nongnu.org/projects/libpartedpp) already provides a
> hand-coded implementation.

Perhaps we can incorporate what this project has done and expand it from
there.

> What about the Python bindings?

I already own a project called pyparted which is a set of [incomplete]
1:1 bindings for libparted.  Python is high on my list of languages we
need to support.

> What are the languages we are going to support? C++ and Python look
> favourable since some work has already been done on them.
> 
> What is the consensus? I am especially interested in the C++ bindings,
> since after C, that is the language I have been working on for a long
> time.

I am not in favor of automatically generated bindings.  I'd rather write
them by hand and maintain them that way.  Autogenerated code is too
unprofessional and sloppy, IMHO.

-- 
David Cantrell <dcantrell at redhat.com>
Red Hat / Westford, MA
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.alioth.debian.org/pipermail/parted-edge/attachments/20070215/6fdf7e9a/attachment.pgp


More information about the Parted-edge mailing list