[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-05-12 09:19:28 CEST

On Mon, May 10, 2004 at 03:40:42PM +0200, Lele Gaifax wrote:
> >>>>> "Greg" == Greg Stein <gstein@lyra.org> writes:
> Greg> Heh. I've been using the Python bindings for
> Greg> years. Literally.
>
> Yes, of course, and me too, through your code :)
>
> But that does not imply that one can actually use them to code say an
> equivalent of "svn add --no-auto-props somefile.py"... After few hours
> I gave up on swig, while it took *half* an hour to understand how to
> do the same for pysvn and contribute it back.
>
> That's the top priority for bindings, imho: assuming one master at
> least one of the two involved domains and is able to read/understand
> code/documentation of the other, he should definitively be in position
> of contribute to them. This is not currently so, as SWIG push in a
> third domain, almost as tricky and complicated as the sum of the other
> two. Pyrex promises just that, and even the C++ layer used by pysvn is
> closer.

SWIG is complicated becasue it is a complicated problem to solve. Pyrex
avoids a lot of that by:

a) Requiring you to rewrite the interface specifications in its syntax.

b) Only supporting one language.

The benefits of SWIG come about by solving the multiple language
problems in many cases and not forcing you to update a separate
interface for every change.

This doesn't always work in practice. Our code is littered with
callbacks which are complicated to make work and are language specific,
especially when trying to make the callback work right in a language
with automatic garbage collection. As a result, some changes do require
updates to the SWIG bindings. But these are the exception, not the
rule.

Regarding your specific complaint, I haven't looked at the Python
bindings, but I can't imagine what is so difficult about
--no-auto-props. You just modify the config on the context. I'm pretty
sure the SWIG Python bindings already support this. As do the Perl
bindings, though the Python bindings I believe are better at it. But
it's been a while since I messed with that stuff. My bet is
documentation of the bindings would go a long way towards resolving this
(and possibly other) complaints you have.

> Greg> But that said: I doubt that Ben was bashing the Python
> Greg> bindings in that way. Instead, I think each of you were just
> Greg> overreacting and should have stopped to take a breath :-)

Now I have no clue what this is talking about? I don't even know what I
said that could have possibly been construed as "bashing the Python
bindings." Nor do I know what way he thought I was. I wasn't bashing
any language or even any way of building bindings. If we were building
bindings from scratch today with no existing work done on them I might
find Pyrex a totally acceptable solution. But to suggest that we should
ditch SWIG now (with so much work already done) and use Pyrex is similar
(IMHO) to saying "Subversion should have been written in Java," followed
by a great deal of debate about the merits of Java. None of it really
matters, the point is unless the Java people (or Pyrex people) are
willing to spend the time to reimplement what is already done with C (or
SWIG). That has been my point all along.

> I concede that :) Sorry Ben for my possibly unweighted words. And
> thanks Greg for raising up my mood!-)

Appology accepted.

-- 
Ben Reser <ben@reser.org>
http://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 May 12 09:19:56 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.