Re:The joy of Perl
by drats on Tuesday March 20, 2012 @06:19AM
(#3728564)
The readability point is key, will anyone ever write an article extolling "the joy of someone else's script whipped up Perl"? Red Hat and Ubuntu both use Python more than Perl when they want something over and above Bash.
[ Parent
| on HN ]
I have had the joy of working with a few other's really clear Perl scripts, and some of it really was whipped up.
I have had others praise code I have just whipped up.
However, the trick here is to get used to documenting your code as you write it. That avoids most problems. It also forces you to clarify your thoughts as you write the code. Clear thought becomes readable code. Messy thoughts become a nightmare.
I've never had problems reading Perl anymore than I've had reading code in some other language.
You've been lucky, then. I love Perl, but there are so many ways to do it you're bound to run into someone who does something in an entirely different way than you. The worst experience I had with this was a colleague who knew the entire Camel book by heart and insisted on using every damn trick there was. He was fired very quickly as the code he produced was impossible for a more normal person to understand
Your anecdote implies that we judge the language by its worst user :)
You need to make certain your people follows the best practices a bit harder in Perl than for many other languages.
But, considering CPAN and Moose, you get much less code in Perl to read, for quite a lot of use cases. If that is not important to you, use C...