Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

So there's a bunch of Perl lovers kneejerkingly responding to this post that the author doesn't "get" it.

Now I myself love Perl and code in it for a living and I think the author does in fact "get" it, it's just that he thinks Perl is a problematic language precisely because "getting it" is required to use it well. It's something he's explained a little further over here:

http://www.prescod.net/python/why.html

You may disagree with him and feel that an easier language does not a better language make (I'm not sure I'm convinced either) but complaining he hasn't read the documentation is proof that you yourself haven't grasped what he's actually talking about.



because "getting it" is required to use it well

This is true of Python also. I don't "get" Python, and you can bet any Python I'd write would be crap.

In order to use a programming langauge, you actually have to learn it. Then you have to use it (to determine what you don't know), and then learn that too. Repeat.

There is no magical "I can understand it without learning" programming language. So any criticism of Perl for this reason applies to every other programming language.


All he really says is that complex languages are harder to learn than simple ones. No kidding. His specific points are valid, except I'm not sure what's wrong with references in Perl.

I still much prefer Perl over Python and C++ over C, and I would recommend my preferences even to a beginner. The steeper learning curves are justified by the power. I disagree with his assertion that you should choose a language on the basis of how easy it is to learn. I also think his Perl vs Python debugging claim is baseless.


> I still much prefer Perl over Python

> The steeper learning curves are justified by the power.

What can you do in Perl that you can't do in Python?


Symbol table manipulation, source filters, run-time method generation via AUTOLOAD, proper closures, taint checking, lexical pragmas...

I think you'd be hard pressed to implement something like Perl's Moose in Python. I'm not completely sure it's possible.

There's a lot of tricky stuff that's easy in Perl but requires tons of hoop jumping in Python.

Don't underestimate the utility of perl one-liners. You can't do them in Python, both because of the whitespace and because in practice Python is too verbose.


> Don't underestimate the utility of perl one-liners. You can't do them in Python, both because of the whitespace and because in practice Python is too verbose.

The value in doing something in a smaller amount of lines is lessened by the lessened maintainability of unreadable code.

Where do you think the effort in maintaining software goes? Typing? Or maintenance?


Where is this unreadable perl? I can't find it. I have no problem reading perl by all kinds of people.

C, on the other hand, is frequently indecipherable because so many lines are spent doing something trivial that it's easy to lose the forest for the trees.


Generally ~kingkongrevenge. Many ways to do things means people who know enough to be competent at writing a language still have trouble reading code created by others due to unnecessary style differences.


On the other hand it might be going too far to suggest a corollary of Greenspun's 10th Rule for Perl, tempting as it may be.


Nonsensical. Perl has most of the lispish features of lisp. There is no re-implementation.

Here's a better rule: "Any sufficiently useful Lisp program contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of standard perl and the best CPAN modules."


That's also nonsensical though. I think most useful Lisp programs will probably run faster in Lisp. Trying to fake defmacro alone in Perl will be probably be a waste of time and ultimately result in following the original Greenspun rule.


Moose "takes the tedium out of writing object-oriented Perl."

Which doesn't sound like something you need in Python - you'll have to be more descriptive.


Perl is not hard to learn because it is "powerful" but because it is gratuitously obscure. Perl culture and the language itself rewards those who use arcane features to accomplish straightforward tasks. Words like "wizard", "magic", "incantation" are slung about willy-nilly, even in the "official " documentation.

Python (culture and language) value complex ideas expressed as simple code.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: