[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Python bindings

From: Ben Reser <ben_at_reser.org>
Date: 2004-04-28 18:46:42 CEST

On Wed, Apr 28, 2004 at 04:43:46PM +0200, Lele Gaifax wrote:
> Ben, I see that's almost impossible to push my arguments, since I feel
> that we do not share a common view on the "shape" the bindings could
> have. I'm more biased toward a high level approach rather than a mere
> one-to-one mapping between Python and C API, as I do not think that's
> what a Python developer like to use. Given that apparently Pyrex will
> give me the opportunity of easily building a OO layer with a clear,
> simpler and more direct connection to the C internals, that's where
> I'll spend my time on, whenever I'll get some.

Now I think you're entirely misrepresenting the opinions given. You
probably got this idea from reading cmpilato's replies. But I'm pretty
sure that's not what he meant.

He wants to provide a wrapping of the C APIs that is nearly identical to
the C API in use. This ensures a full and complete wrapping of the
APIs. There are other reasons to do this such as prototyping new
feature expansions that we might want to add to the C based command line
client in Python.

However, cmpilato never rules out providing an OO interface. He just
states that he wants to have the more direct layer available. In fact I
think he even said he wanted to work an a more Python like layer on top
of the SWIG bindings when he had time.

The real difference of opinion here is that you don't think a nice
Python-esque interface is possible with SWIG. Which I doubt because the
Perl SWIG bindings do have such a nice OO interface and not because SWIG
made them for us.

You also seem to think SWIG is a bad choice for Python. While at the
same time think it's a better choice for Perl. I have idea why. It's
not really any nicer for Perl IMHO than it is for Python. It might be
able to do higher level wrapping for us in Perl than Python, but we're
not using it anyway because I didn't like what SWIG generated...

So don't get me wrong. I don't think SWIG is the end all solution. But
at the same time it's what we have been working with for a long time.
It has some advantages. I think your time would be better spent working
on writing the OO layer on top of SWIG. I think I said all this on IRC
the last time we talked about this. So this is probably just rehashing
what I've already said.

Ben Reser <ben@reser.org>
"Conscience is the inner voice which warns us somebody may be looking."
- H.L. Mencken
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Apr 28 18:46:59 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.