Hello Perl community. First of all, i'd want you know that the objetive of this question is _not_ for create polemic about perl and python... I'm learning Perl, and for curiosity i've seen some comparisions about Perl and other programming lenguages like: PHP, shell scripting, awk, etc... I also read some comparisions about Perl and Python, and in many of them, (which are posted in www.python.org) says that, one could consider Python rather than Perl for some reasons like this: - Python has a cleaner syntaxis and it makes the code more readable and easy for mantain, so some people that are computer programmers says that, when you are coding a large application with Perl often you get confused, and many times you can't understand the code.. Another feature for Python over Perl is that Python is more OO than Perl.. Now, my question is: ¿What features do you think Perl has over Python? Thanks for your answers..

Replies are listed 'Best First'.
(jeffa) Re: Perl vs Python
by jeffa (Bishop) on Mar 24, 2002 at 00:17 UTC
    "What features do you think Perl has over Python?"
    1. CPAN
    2. TheDamian
    3. merlyn
    4. Perl Monks
    "Another feature for Python over Perl is that Python is more OO than Perl"

    That is a vicious lie. Now, if you want to talk better OO, check out Ruby. (but i still think Perl's OO is gold)

    tilly : gone, but not forgotten

      Here, here. A solemn nod for tilly.

      Python is called more object oriented than Perl. This is somewhat true. Perl 6 will change that, but OO is deep inside of Python's design philosophy. Perl has inconsistent or random (seeming) features to help get your job done. We got nested scopes, they got metaclasses. Truth is that 98% of the time, we're talking about syntacitic sugar and philosophy when we discuss the two languages. When we'retalking features, Python generally has less features to per problem space, but sometimes Python's consistency makes it easier to guess HOW you'll do something if it's out of your field. But that's usually cause it'sthe ONLY way to do it. (Metaclasses are still cool though :-)

      Cheers,
      Erik
Re: Perl vs Python
by dorko (Prior) on Mar 24, 2002 at 00:03 UTC
Re: Perl vs Python
by Starky (Chaplain) on Mar 25, 2002 at 01:37 UTC
    I've seen a gajillion reasons pro and con to choose Perl over Python and vice versa.

    Python is a newer language and definitely has a strong advocacy surrounding it. I've heard Python users upbraiding Perl users because they think their language has a better OO model. (Personally, I really like the freedom that Perl gives you in its OO model, though some things like interfaces and the ability to use enforced public and private methods, perhaps through pragmas, should at some point find their way into the Perl lexicon.) In a couple of years, Ruby will be the up-and-comer and its advocates will be upbraiding Python users for not using the "most OO" language.

    But what is true now and what will be true in five years is that they're all fine languages, each with strengths and weaknesses, and any one of them will do what any of the others do about as easily in the hands of an experienced programmer.

    (The only exception to this is the CPAN, which allow Perl users to stand on the shoulders of giants. Undoubtedly in a few years Python and Ruby will have their own versions of the CPAN well-stocked with valuable contributions, though Perl definitely has the first-mover advantage here.)

    So when I am asked what language is the best, my response is to ask several questions: What are you going to try to do? What do other people you know (and who could give you help or mentorship when you need it) use? Which community do you find to be the most open and helpful?

    I've tried Python and keep coming back to Perl. Personally, I think the freedom it gives me as a programmer is important. The CPAN is incomperable in every sense of the word. And it's just turned out to be the most practical choice in most situations.

    But one is not clearly better than another by any means. In fact, they're really two sides of the same coin. And your choice should reflect your goals and preferences, not some esoteric argument about style that hardly matters to the efficacy of a programmer in either language.

    My primary hope as I watch the communities evolve around Perl and Python is that they do not get mired in squabbling about who is the best (like identical twins calling each other ugly) but that they take the spirit of the open source community to heart and cooperate on such projects as Parrot to their mutual advantage.