Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Perl Vs Ruby

by ptoulis (Scribe)
on Nov 26, 2008 at 16:11 UTC ( #726145=note: print w/ replies, xml ) Need Help??


in reply to Perl Vs Ruby

As many fellow monks have said, it is really a matter of taste. Ruby is hot right now, no doubt, perhaps hotter than Perl. However, Perl is much more mature and has CPAN. So I guess both are great for building the so called industrial-strength applications.

Technically Ruby is yet-another-language that copied Perl and added a complete object system (which came late in Perl). Its syntax is pretty much a ripoff from Perl. This is why Larry Wall considers it the biggest 'threat' to Perl's 'ecological niche'.

So I guess this is why it is a matter of taste. There is no much distinction in technology (they are both dynamic, general-purpose languages), no difference in speed( Perl is a little faster), and also both are supported by vibrant communities.

I will stick with Perl because I know it is THE one of its kind. It took others a decade to fully realize the real power of the language and now that we have all these clones around, perhaps Perl 6 will be the next big thing.


Comment on Re: Perl Vs Ruby
Re^2: Perl Vs Ruby
by LanX (Canon) on Nov 26, 2008 at 17:28 UTC
    > no difference in speed( Perl is a little faster),

    Interesting! The last benchmark I saw showed a factor 3 difference. Do you please have a source or link for me with newer results? 8 )

    Cheers Rolf

    UPDATE: added smiley

      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.

        Actually I don't trust benchmarks I haven't manipulated by myself! 8 )
        ... but I'm a little disappointed you can't point me to a good argument to use ruby.

        You think that factor 3 doesn't count, but a webadmin might reject to realise his template engine in C.

        Cheers Rolf

        I'm no Ruby expert, could you please explain or at least "link" to what you mean with : )

        > Perl has less of that, but it does offer a more consistent way of creating and passing functions.

      The last benchmark I saw showed a factor 3 difference

      Do you really consider a 6,000-times-repeated call of one function, on a 500MHz machine, to be a language benchmark? Please, don't.
        > Do you really consider ...

        Nope, but I asked you for a better benchmark...

Re^2: Perl Vs Ruby
by rovf (Priest) on Nov 27, 2008 at 13:30 UTC
    Perl is much more mature and has CPAN.

    Well, Ruby has rubyforge instead. Most stuff at rubyforge is now stored as so called "gems", which makes them convenient to install.

    I didn't count the modules on CPAN and rubyforge, but I think CPAN has more to offer, since Perl has much longer history. Still, the module base on Rubyforge is pretty big (http://rubyforge.org/softwaremap/trove_list.php).

    -- 
    Ronald Fischer <ynnor@mm.st>
      > I didn't count the modules on CPAN and rubyforge

      Well he did, but don't forget to read the replies... 8 )

      Cheers Rolf

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://726145]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2014-08-01 03:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (256 votes), past polls