Well ... in the absence of a financial motive, like being paid to
maintain code in Perl or Python, I would recommend learning them only if
there is some functionality implemented in one of them that you want to
hack on. Focus is a wonderful thing, and Ruby is deep enough that such
focus will be repaid.
Someone else on this thread recommended learning a functional language
like Haskell. While knowing a functional style is important in the
theoretical computer science world, it isn't necessarily going to make
you a better programmer. I think it's really more the other way around
-- if you're a good programmer, you'll learn functional programming
easily and think that it made you better. If you're not a good
programmer, you're better off getting good in one (imperative) language
for a few years.
I disagree. Learning new paradigms of programming well enough to really
grok how they work teaches new patterns of thinking -- which broadens and
deepens one's understanding of programming in general. It makes one a
better programmer. Only those incapable of really grasping the
underlying philosophies of varying programming paradigms will not benefit
from learning a new language whose focus is in a different paradigm than
previous languages. Even learning different languages in the same family
will make one a better programmer, when the reasons for these differences
are understood.
I learned more about MS Windows by three months of familiarization with
Linux systems, when I first encountered Linux, than I had in the
preceding three *years* of in-depth use and support of MS Windows.
That's because I learned a lot about the differences between MS Windows
and Linux systems, which gave me valuable insights into the reasons for
these differences -- good, bad, and just plain different. The same
applies to learning more programming languages.
That's not to say that one should split one's focus between multiple
languages early on. As much as possible, new programmers should focus on
learning *a language* for quite some time. When really proficient with
that language, *then* learn a new one. Learning to program well is best
pursued with a philosophy of serial monogamy, as far as I'm concerned,
with enough dalliances with past programming language partners to stay
familiar with them and be able to reasonably compare and contrast them
with the current focus. As more languages are learned, the time and
effort necessary to learn a new language should decrease. An arbitrary
guesstimation of a schedule of learning languages might look something
like this:
Foo: Five years.
Bar: Three years.
Baz: Two years.
Qux: One year.
Quux: One year.
Quuux: One year.
Quuuux: One year.
. . .