On May 26, 2008, at 3:53 PM, David Reiss wrote:
The biggest issue here
is, of course, that the API will be changing, and changing in ways
that means that non-ruby developers won't be able to easily draw
parallels between their code and the ruby code. I view this as a
necessary sacrifice.
Why is it necessary to break parallels so completely in order to make
the API more Rubyish? We've had some changes suggested to the Python
API to, for example, use named parameters and callables (instead of
factories), but the basic structure of the library (and the
interfaces)
would remain the same.
Looking at the ruby library, it just screams "Java", and as a ruby
programmer it feels very dirty. For example, TBufferedTransport uses
some kind of odd inheritance/delegation pattern that is very clearly
compensating for single-inheritance. In ruby, mixins are a much
cleaner solution. In the current libraries, all these classes pollute
the global namespace. They should all be encapsulated under a Thrift
module and be given better names (such as
Thrift::Protocols::BinaryProtocol instead TBinaryProtocol). The
'thrift/thrift' library defines a bunch of classes (again in the
global namespace) which should all be broken up into separate files
and placed under the Thrift module and renamed. The method names are
not idiomatic to ruby - I'm seeing things like readStructEnd instead
of read_struct_end and isOpen instead of open?. I'm also seeing
attempts to mimic Interfaces/virtual classes, which is just plain ugly
(see TProtocol where every method returns nil). It's stuff like this
that I want to change, and doing all of this will be a fairly large
API change.
Are there any objections, suggestions, or questions here?
I would suggest that you sync up early with Kevin Clark, the de facto
owner of the current Ruby mapping.
I saw he had a fork on github, but the last commit was 1.5 months ago.
I suppose I'll have to ask him about that.
Is there a git repository somewhere?
There is an unofficial repo at <git://thrift-git.thruhere.net/thrift.git
>.
A lot of non-committers have been using it to develop and share
experimental branches. I can give you an account so you can push
branches if you send me your ssh public key. If you prefer github, it
is mirrored at <http://github.com/dreiss/thrift/tree/master>, but I've
been encouraging developers to also push their changes to thruhere so
everything will be in one place.
How frequently is that mirror updated?
-Kevin Ballard
--
Kevin Ballard
[EMAIL PROTECTED]