Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re^2: Perl Vs Ruby

by JavaFan (Canon)
on Nov 26, 2008 at 12:45 UTC ( #726092=note: print w/replies, xml ) Need Help??

in reply to Re: Perl Vs Ruby
in thread Perl Vs Ruby

For people not knowing either language, I have the impression that Perl is easy to lear, while Ruby is very easy to learn.

I don't know about Ruby, but I disagree that Perl is easy to learn. Perl has tons and tons of features, quirks, special cases, and its own lexicon of idioms. On top of that, many simple tasks can be done in a diverse set of ways. In my experience as a teacher of both Perl and non-Perl languages, that makes Perl hard to learn. Many languages can be taught in a 3 or 4 day course. If I give a 5 day Perl course, I feel I've barely scratched the language.

Now mind you, I don't think that a language that's hard to learn makes it worse. It's easy to learn how to handle a wheelbarrow, and it's a lot harder to learn to drive an 18 wheeler truck. But that doesn't mean the wheelbarrow is better at hauling.

Replies are listed 'Best First'.
Re^3: Perl Vs Ruby
by rovf (Priest) on Nov 26, 2008 at 13:24 UTC
    I don't know about Ruby, but I disagree that Perl is easy to learn. Perl has tons and tons of features, quirks, special cases, and its own lexicon of idioms.

    Maybe I should have been more precise here. I want to say: It is easy to get quickly to a point where you can write useful programs. Of course by then you know only a small subset. For instance, I wrote my first useful Perl program after having read about 3-4 hours the introduction in the Camel book. Before that, I wrote programs in C++, C, Tcl, ksh, Pascal and some other languages. I found that with Perl I became productive quickly.

    With Ruby, I found it somewhat faster to "go productive" and the language seems to me easier for beginners. I was teaching an absolute beginner Ruby as the first programming languages, and after maybe 10 hours in total, she was using it to write a 50+ line program which actually solved a concrete task (not a toy problem).

    In this respect, both Perl and Ruby are easy to start with, I think. But any language with a lot of features take time to learn. Even languages with a simple syntax, like Java or Lisp, do. With those languages, the "experience" needed to master them is in understanding the libraries, respectively the functions.

    May I ask you which languages you consider as simple to learn?

    Ronald Fischer <>
      > May I ask you which languages you consider as simple to learn?

      IMHO, Javascript, very reduced but effective! (please note, I don't mean DOM!).

      Many people instantly can write JS Code.

      Unfortunately JS has some fundamental design flows, hindering to go further towards a all purpose language!

      1. "for in" operates on herited properties, without any possibility to add elements to prototypes which are flaged as not enumerable.
      2. prototypical inheritance is a very unusual concept (but simple)
      3. Packaging is not easy to realise.

      IMHO JS will replace VBS and Python as "built in scripting language" for applications.

      Cheers Rolf

      UPDATE: To avoid misunderstandings, JS is for sure no all-purpose language, but easy for beginners!

      May I ask you which languages you consider as simple to learn?
      I'm not sure if there's any general purpose language that's both useful (as in, allowing one to program in an efficient manner) and simple to learn.

      But to name one thing that makes a language easier to learn to program in than Perl is what I call "lack of distraction". Perl syntax is rich and full, but because of that, it offers a lot of distraction - it's hard to introduce a new concept without having to explain new pieces of syntax. For that reason, I claim that C, Java, Python, LISP, Pascal and Haskell are all easier to learn than Perl. Of course, if someone already has a lot of experience in procedurial languages (for instance C) it'll be easier to learn Perl than LISP or Haskell. But as a first language, the languages I mentioned are easier. You can reasonably quickly learn the syntax, and then when you teach more advance techniques, you no longer need to focus on syntax anymore.

Re^3: Perl Vs Ruby
by Your Mother (Chancellor) on Nov 26, 2008 at 19:17 UTC

    I think you and rovf are both right. Perl is extremely easy to dive into and use but terribly difficult to master. I wrote my first production code 2 weeks after picking up the Llama 10 years ago. 10 years later I still learn new things here at least weekly. This is part of Perl's charm for me. It's exactly as useful/difficult/easy/productive as you have the interest to make it. Its payment curve coincides with its learning curve.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://726092]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2017-07-25 05:55 GMT
Find Nodes?
    Voting Booth?
    I came, I saw, I ...

    Results (363 votes). Check out past polls.