in reply to Re: Perl to Ruby translator?
in thread Perl to Ruby translator?
The first one is irrelevant to most of us, and that is that Ruby smoothly supports multiple different character encodings, including ones for Japanese text which aren't directly-supported other scripting languages (like Perl). This is notable because it is why Ruby was invented.
Other than that, Ruby is a highly derivative language which is mainly notable for a remarkable consistency in its layout and design. Before I tried Ruby I wouldn't have believed that this was an important feature. After trying it, I was amazed at how many things which in Perl look magical because of how the language has hidden things from you (eg overload and tie) in Ruby are so natural that it was only in retrospect that I realized that the language was cleanly enough structured that no extra hooks had to be added to let the user play with those.
My capsule summary is this. On a few small projects that I did in Ruby, I found that I did the same thing in about half the code that I did in Perl. However my code ran slower, and I had to rewrite things that in Perl I would have gotten from CPAN. Furthermore, I am unlikely to get a job programming Ruby, but I can with Perl.
Furthermore I recommend learning Ruby's class library to people at a certain level of expertise in virtually any language as an example of what good design. This only holds in a certain range. If you don't have enough background then you can't see why the design works, and won't get much out of it. If you have too much, then you have hopefully seen the basic ideas already in Smalltalk, Lisp, Perl, etc.
I can't readily quantify what level is right for that experience to be valuable. But I was certainly in the right range 2 years ago.
|
|---|