Re: [PATCH/RFC 0/7] Support for Ruby

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Sep 21, 2013 at 01:48:08PM -0500, Felipe Contreras wrote:
> Hi,
> 
> It was discussed before that there was a need to replace Git scripts
> from perl and sh that utilize the 'git' binary to do everything they
> need, which requires many forks, and that creates problems on
> platforms like Windows.
> 
> This is a first step meant to show how a solution using Ruby would look like.
> 
> Other alternatives just don't cut it. Shell scripts are too simple, and
> invariably require forks. Perl could use Git's internal C code, but it's syntax
> is too cumbersome and it's loosing more and more popularity. Python and Ruby
> are the only modern languages that could fit all the needs, but Python's syntax
> is not ideal, specially considering the background of the Git community, and
> also, Ruby's C extensibility is simply superb.
> 
> This patch series introduces Ruby bindings for Git's C internal library, and
> add example commands to show how it could be used, and how it resembles the
> original C code, shell code, and perl code. Basically, Ruby fits like a glove.

A couple of things: first, I'm not opposed in principle to using Ruby
for git.  As you say, it's a good language and it has much nicer C
bindings.

As Junio has also pointed out in the past, there are people who aren't
able to use Ruby in the same way that they are Perl and Python.  If it's
announced now, Git 2.0 might be a good time to start accepting Ruby
scripts, as that will give people time to plan for its inclusion.

On a more technical note, my objection to your binding implementation is
that fundamentally, Ruby is an object-oriented language, but your
bindings don't take advantage of that; they're completely procedural.  I
realize most of the git codebase is as well, but that's because it's
written in C.  It seems a shame not to take advantage of what the
language offers, especially since I know others are going to want to
take advantage of the provided bindings.

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]