On 10/04/2007 8.17, Sage La Torra wrote:
>> Perl has Inline::C and Ruby has DL. I don't know if they are as good
>> as ctypes. I saw this post on the users@ list:
>> http://svn.haxx.se/users/archive-2005-06/0573.shtml
>>
>
> You're right about Inline::C, among other cool Perl stuff. Perl has
> some very good support for C in a variety of forms already, and as far
> as I know this is being preserved in Perl 6. If you can make a C
> binding, it can pretty much work in Perl, so don't worry too much
> about that.
... which basically means that all the work that is being done on the SWIG
bindings is basically unneeded (as much as it is with Python-ctypes)?
Subversion already has a low-level API: the C API. Reinventing a
still-low-level-but-not-identical C API with SWIG is not a good idea, but it
would be a better idea if it were easier to achieve: and I mean easier for
both SVN developers (maintaining the bindings), and binding users (which are
let down by the complexities of building the SWIG bindings and SVN itself just
to drive a commit by script... eg. for years we haven't had a Python 2.4
binding for Windows just because *nobody* was able to correctly compile it).
I can't comment on Ruby DL or Perl Inline::C (which doesn't exactly look like
ctypes to a quick look but I'll let expert comment), but Python ctypes looks
like the perfect solution for wrapping Subversion C API. SWIG was a nice idea
in theory, but turned out to be a huge mess in practice. We can *still*
achieve cross-language compatibility by simply sticking the low-level binding
to the C API: we don't need to use the same tool for all languages, we just
want the same API, that's all.
+1 again for ctypes!
--
Giovanni Bajo
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Apr 10 12:07:21 2007