News for hackers. Stuff that matters.
Re:Perl 5.11 released by blue1 on Saturday October 03, 2009 @01:00PM (#858920)
Perl does not enforce good practices, perl does not enforce nearly anything. Which means which is a good hackers tool (isn't this HN?), but probably not very suitable for your "people who don't know any better".
Re:Perl 5.11 released by jrockway on Saturday October 03, 2009 @02:51PM (#859022)
What language does enforce "good practices"?

(You seem to think that the programming community knows what "good practices" are. I have not seen any evidence of that.)

Re:Perl 5.11 released by gaius on Saturday October 03, 2009 @03:13PM (#859044)
It's a cultural thing. If you use an obscure feature of Perl (or Ruby, for that matter) to do a common task in a novel way the community will call you a "wizard", high praise. Do the same in Python and someone will patiently explain that the rest of the community has reached a consensus that this thing is done this way, for these reasons.

Most of Perl's bad reputation (e.g. that it's a "write only" language) is simply because the community around the language reinforces that style of coding.

Re:Perl 5.11 released by jrockway on Saturday October 03, 2009 @03:34PM (#859065)
Very good point.

As of late, I think Perl has gone more in the Python direction, and Ruby has gone more in the "old Perl" direction. (It is mildly amusing to watch the Ruby community make all the mistakes that Perl made 10 years ago, especially with its advocates' constant hatred for Perl.)

Re:Perl 5.11 released by pfedor on Saturday October 03, 2009 @04:35PM (#859132)
I think Perl's bad reputation comes mostly from its expressive power. People directly perceive and compare the difficulty of reading and understanding a few consecutive lines or blocks of code. Understanding 20 lines of Perl is on average more difficult than understanding 20 lines of, say, Java. The upshot is that you need much more than 20 lines of Java to implement code equivalent to those 20 lines of Perl. But this fact tends to slip your mind when you're pounding your head against the screen trying to figure out how some specific passage works.
Re:Perl 5.11 released by makecheck on Saturday October 03, 2009 @09:46PM (#859532)
Yes, I think so.

I recently had to explain to someone what "_" means in Perl (not to be confused with $_ or @_). It was simple for me to answer, because I had the experience. But someone seeing it for the first time wouldn't exactly be able to Google it, or look it up in a man page; who would think to look for it under "perldoc -f stat"? What's more, this particular short-cut, while useful, has a side effect: if someone maintaining the code inserts a stat on a different file in between the original stat and the "_", then the source of the "_" changes. For a single character in a script, that's a heck of a lot of barriers for a new programmer.

Re:Perl 5.11 released by gaius on Sunday October 04, 2009 @05:44AM (#859892)
Perl has demonstrated itself to be an effective tool for experienced sysadmins to write single-purpose or throwaway scripts, but applications spend most of their lives in maintenance. It it always a false economy to make things difficult for maintenance programmers, even unintentionally.

Pretty much everyone I work with has been burned by being handed some legacy Perl to maintain and as a result we are very reluctant to do any new work with it. The payoff for rewriting in Python is that the technical debt incurred for using Perl in the first place is repaid.

Re:Perl 5.11 released by chromatic on Sunday October 04, 2009 @11:42PM (#861148)
I think your first paragraph contains a non sequitur. The existence of the strict and warnings pragmas, Perl::Critic, Perl::Tidy, Test::More, the size of the bundled perldoc, CPAN testers, CPANTS, et al all contribute to the maintainability of Perl 5 applications.

If you choose not to take advantage of those tools when writing a Perl 5 application, you bear the risk yourself. How does that reflect on the language or the ecosystem?

Re:Perl 5.11 released by pfedor on Sunday October 04, 2009 @05:04PM (#860632)
Not to defend this particular programming idiom, but the third result for [perl underscore] is "About Special Underscore Filehandle" http://www.perlmonks.org/index.pl?node_id=613621 so it's rather easy to Google.
Re:Perl 5.11 released by gaius on Saturday October 03, 2009 @04:45PM (#859151)
I'm not sure that's true. There are plenty of languages as dense as Perl (e.g. how much you can get done with just a screenful of code) but no-one says Haskell (or even Python or Tcl) is "write only" (for example).
Re:Perl 5.11 released by jrockway on Saturday October 03, 2009 @05:05PM (#859175)
Some Haskell is "write only" :)

http://dev.pugscode.org/browser/src