Re^3: Perl Vs Rubyby Joost (Canon)
|on Nov 26, 2008 at 20:13 UTC||Need Help??|
A factor 3 isn't really that much of a difference, considering that with both languages you can/must switch to C/C++ for CPU-heavy work, which will fairly easily give you a factor 20 .. 100 speed increase, depending on the problem.
update: I might as well throw my opinion on Perl vs Ruby in here.
Ruby is slower than Perl, but neither should be used if pure raw speed is your ultimate goal.
Ruby has some nice idioms in the core library that are open for anyone to use and extend. Ruby's iterator/collection idioms are particularly nice compared to perl's mess of for(each) / while ... keys ... / whatever interface some CPAN module implements.
Perl has a larger range of modules in CPAN. Ruby modules are not organized in one place, so that means it's harder to find good quality extensions that do what you need.
Ruby's built-in OO interface is a LOT better than Perl's (which probably also explains why perl's standard collections suck so much).
Ruby has reasonably nice syntactic sugar for functional constructs. Perl has less of that, but it does offer a more consistent way of creating and passing functions.
Neither language has serious threading support - though Perl's ithreads are fairly easy to integrate with C/C++ pthreaded code.
Personally, if I wanted to create something large using a lot of OO that's not all that CPU critical, I'd probably go for Ruby over Perl, because Ruby looks better (especially OO code). If it also needs to be FAST, I don't know what I'd use - Common Lisp maybe, or Java, or C++, or possibly Clojure.