3 ms·
I will take your question seriously and give a very personal reaction. (You are obviously not a flamer, despite 1 comment here.) I haven't tried modern Perl. Ma
by T_S_ 16y ago
I will take your question seriously and give a very personal reaction. (You are obviously not a flamer, despite 1 comment here.) I haven't tried modern Perl. Maybe you could lure me back to perl.
I programmed in perl for about 4 to 5 years on an intermittent basis. I though it was great. I then switched to python because my lab was doing a big project in python. I ultimately became more comfortable with python over perl for some very simple reasons. (1) Readability. I could understand code from others far more quickly. I could understand my own code better after leaving it for a while. (2) Introspection in the REPL. Things like dir and docstrings were very helpful. Initially I felt the perl debugger was superior, but I came to rely on pydb running inside ipython and got along ok. (3) CPAN. Python was way behind but got close enough for me after easy_install became common. scipy and numpy were important to me and the perl variant of these things (pdl, I recall) seemed to lag. (4) OO was always easier for me to grok in python, probably because it was originally designed with OO in mind.
In the end I found I really don't like OO all that much, and now I code in haskell, which is an entirely different story.
Looking back I would also say that Perl6 was a huge distraction without a big payoff. It should have killed off Perl 5, yet it lives. Seems like Python 3 has similar issues. I haven't done much with Ruby besides skim a tutorial or two and wonder why it has gained so much mindshare.
Again, this is strictly a personal assessment and not meant as advice for anyone.
- chromatic 16y agoReadability is subjective. Python code frustrates me because I can't tell when blocks end; for some reason, my mind ignores horizontal whitespace in the same way that other people can't understand sigils. Python has long had a huge advantage with its REPL; the Perl 5 debugger is clunky and difficult to use and, despite some heroic refactorings, still a mess. Perl 5 lifted Python's OO model. That's why both languages have an explicit self and why neither language makes a strong distinction between functions and methods. A method is merely a function installed into a namespace and somehow invoked as a method. As for Perl 6, most of everything good that's happened in Perl 5 over the past several years has roots in Perl 6. I'm not claiming that without Perl 6 these things wouldn't have happened, merely that they did as a direct result of Perl 6. This includes the book Perl Best Practices and the Perl testing renaissance.