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

Re: State of ruby bindings?

From: Greg Stein <gstein_at_lyra.org>
Date: 2003-07-02 09:33:27 CEST

On Tue, Jul 01, 2003 at 10:30:14PM -0400, Russell Yanofsky wrote:
> Kristian Hogsberg wrote:
> > Garrett Rooney <rooneg@electricjellyfish.net> writes:
> > Yeah, I realize the SWIG bindings are easier to maintain, but I looked
> > at the python bindings and I wasn't too impressed. The subversion C
> > API appears to be object-oriented C, in much the same way as the Gtk+
> > toolkit, but the python bindings doesn't really reflect this. For
> > example, the following code (from svnlook.py)
> >
> > txn_ptr = fs.open_txn(self.fs_ptr, txn, pool)
> >
> > should be (in my opinion, of course):
> >
> > txn_obj = fs_obj.open_txn(txn, pool)
> >
> > where the pointers are wrapped in python objects so you can say
> > obj.method(args) instead of method(obj, args) as you would in C.
> It's possible to use swig to make a more object oriented interface. See the
> "Adding member functions to C structures" section of the swig documentation at
> http://www.swig.org/Doc1.3/SWIG.html#n37 .

Not only that, but the idea behind the Python bindings is to expose the raw
C functions, then build the extended functionality all in Python. i.e. you
build a sweet object system in Python. No need to continually update C
code... do it in nice, fast-to-code Python.

Seriously... expose functionality in SWIG and build on top.


Greg Stein, http://www.lyra.org/
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jul 2 09:28:35 2003

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.