[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ruby
Actually, after a fairly interesting debate with Dan Sugalski over
whether Ruby would be the "next big thing," I downloaded the
current stable release, along with several of the tutorial
documents. The distribution got a few extra points with me for
building on OS X "out of the box," as it were, but fell short in a
number of areas I've come to rely on with Python and Perl.
First, like all new (for some value of 'new') languages, there is a
lack of a single, logical path you can use to learn and begin
experimenting with Ruby. Python has the online tutorial, and Perl
has the Camel Book, and while I'm sure that Ruby will be there
soon, I didn't get the same sense of guidance and support starting
out with the language. There is also the 'new' language issue of
library support; while I'm sure that there are, say, XML parsers,
profilers, etc. out there, the time I spend digging for them,
rather than just checking the standard library documentation or
going to CPAN, is time that could have been spend writing code.
Secondly, and more fundamentally, I find it much harder to get
excited about a language that's strictly OO. I fled Java for that
very reason -- there are a lot of projects I do which either don't
require the extra scaffolding of an OO system, are better written
in a functional style, etc. I realize that you *can* write Ruby
"scripts," which look just like procedural code, but even in the
tutorial documentation, it's admitted that those functions are
simply being added to the 'Object' class, from which all other
classes are derived.
There are some pieces of the language that I prefer to Python
(which is what I find myself doing more and more development in):
1. Easy 'block' syntax: since Python's version of 'lambda' only
supports a single statement as its body, rather than a suite, I
often have to define named, locally-visible functions instead.
2. Generators/iterators: these are in Python 2.2, but it's going to
be at least several months after the upcoming 2.2 stable release
before I'll be able to reliably distribute any code that relies on
them.
3. C API: I've looked at the source for several Ruby extension
modules written in C, and the API is much cleaner than it is with
Python.
In short, I find Ruby quite interesting, but I haven't really seen
a class of tasks for which it would be significantly more efficient
or pleasant to code in than Python or Perl, even if the conceptual
model is a little cleaner. Of course, if I were really worried
about the semantics of my daily workhorse language, I'd be using
Scheme, right? ;)
Lennon Day-Reynolds
Software Engineer
Kestrel Institute
- Follow-Ups:
- Re: ruby
- From: Dan Weinreb <dlw@exceloncorp.com>
- Re: ruby
- From: Simon Cozens <simon@simon-cozens.org>
- References:
- ruby
- From: Eli Collins <eli@u2i.com>