In article <com>,
Zach Dennis <com> wrote:
Sure you can do OO Perl... you could probably do OO Assembly too if your
pain tolerance is high enough.
Turns out that OOPerl tends to run slower than Ruby, so if you're planning
to do the project in an OO style, you should keep that in mind.
(of course, procedural Perl is faster than Ruby in general).
I can only give you my experience in moving from Perl to Ruby (which for
me happened in early 2001): We were developing a distributed test system
that also needed to run on several machines (similar to your requirement).
I started out in OO Perl, but soon I decided that the code-base was just
becoming unwieldly bersome. I looked at Ruby and within a couple of
weeks of getting the pickaxe book, I was more productive in Ruby than I
had been in Perl (and I had programmed primarily in Perl for several
years). (drb helped a lot with that project as well, you might want to
look into it.)
Perl as it is now has had it's day and now is starting to look a bit
too old. I wouldn't recommend Perl for any real production system at
this point when there are much better alternatives available now (and I
used to be a big fan of Perl). Perl6 may change my mind, but it's still
vaporware at this point.
I think the main advantages Ruby offers over Perl are in the following areas:
1) Maintainability (and readability): It's nice to come back to your code
six months later and have a good idea of what you were trying to do
and what you were thinking back when you wrote it. One of the things
that annoyed me the most about Perl readability was that you couldn't
tell what arguments a function took just by quickly glancing at the code
since they pass arguments via the _ array. You had to look through
the whole function to see what was being shifted off of _.
2) Real support for OO with a very nice Smalltalk-like model. OO is not a
do-it-yourself, ad-hoc afterthought as it is with Perl.
3) enhanced productivity (in my experience, anyway, YMMV).
4) very easy to write C extensions for Ruby. (to be fair, this has
improved for Perl as well since the Inline modules have become
Sure, Ruby's RAA isn't as large as Perl's CPAN, but you'll find a lot more
functionality built-in to Ruby's libraries than you will in Perl - for
example, look at all of the built in functions for arrays in Ruby vs.
Perl - so you'll find yourself reaching outside for special libraries less
often than you need to with Perl.
Perl was great in it's day (5 to 10 years ago), but times have changed.