Hacker News new | ask | show | jobs
by jnazario 4945 days ago
"Really?" yes.

like another commenter said it's a discussion i've had before and haven't heard compelling arguments in favor of perl, so no i'm not interested in revisiting it.

that said it IS context dependent. i wont fire you for writing perl one-offs to maintain some systems or process some files. but i would argue against you for wanting to ship perl for the reasons i stated, with my main thesis being that your decision would jeopardize the project's future (assuming it had some future). i've heard the arguments before, like "you can write clean and maintainable perl" (which has analogues with "high performance java" and "long-term maintainable PHP"). the counterpoint is "sure, one can. but people rarely do. other tools promote those features more readily. pick one of them."

1 comments

None of the reasons in your post would lead me to believe that Perl will 'rot your brain.' I didn't consider the majority of your post to be a flame/troll, just your honest opinion. It was the "Perl eats babies, and you can't convince me otherwise, nyah!" at the end that sort of irked me.
i very firmly believe the following:

first, that some languages promote decent coding practices, while some actively encourage bad ones, either through crappy idioms, bad docs and a lousy community, or a lack of immediate penalties.

second, that where you spend much of your time coding has a significant effect on how you think about problem solving, consequences, etc. the practice of programming builds behaviors, modes of thinking, and values.

finally, if it isn't clear, i consider perl's features to be substandard to long term coding. the values it places on hacked up gimmicks (under the guise of "more than one way to do things" and "see! it's a one liner!") is a large part of this.

therefore "brain rot" in this case isn't equivalent to years of meth use, but rather a failure to appreciate crap designs, a failure to perform sound engineering when you write code, and a failure to think about the future of your code. i've seen the products of people who write code professionally, with them having learned through years of coding perl, and it is not pretty. lots of them.

keep calling me closed minded on the topic, i wont disagree. but the end result is that when someone tells me that perl is their language of choice and i'm hiring for a person to write code, it's a deep hole they have to get out of right away or i won't hire them, nor will many of the people i work with.

  > the values it places on hacked up gimmicks (under the
  > guise of "more than one way to do things" and "see!
  > it's a one liner!") is a large part of this.
I'm curious where there is official documentation of Perl as a language putting emphasis on "See! It's a one-liner!" Sure Perl has things like Perl Golf[1], but I could equally point you to The International Obfuscated C Code Contest[2]. That doesn't prove that C as a language encourages you to intentionally obfuscate your code.

  > when someone tells me that perl is their language of choice
  > [...]  i won't hire them
Perl isn't my language of choice, but I'm not sure that I want to work for someone that has such a view of the world. You're attempting to use a small piece of data ("I like to program in Perl") to extrapolate a whole lot about a person.

[1]: http://en.wikipedia.org/wiki/Perl_Golf_Apocalypse

[2]: http://www.ioccc.org/

I am wondering why it is as it is. I think it may be because of perls abundance of short cryptic symbols that people feel somehow "proud" to 1) know what "while(<>){print if($.==2 || $& && !$x++); $.=0 if (/^--+$/)}" does and 2) to make it even shorter. Because with )(!ยง&/$?(=)% with hell a lot of meanings you could write entire perl scripts based on special characters.

A good example is http://www.nntp.perl.org/group/perl.beginners/2009/01/msg106... that i just found googling for perl one liners. The OP want's to know what this line does, the first answer is "you can make it even shorter!". Somewhat explains what i try to say ;)

Surely there is a lot of clean perl code out there but from my experience at customers (i'm consultant) what happens in-house in some development departments looks very very very different. Then again i've seen a lot broken, half-tested and unmaintained CPAN modules as well.

One liners are an (extreme!) optimisation and programmers feel quite proud when they able to optimise code :)

And it's not restricted to Perl: http://news.ycombinator.com/item?id=4906370

> Then again i've seen a lot broken, half-tested and unmaintained CPAN modules as well.

You also get this in PyPi, Gems, NPM, etc. Just more proof that Sturgeon's Law exists.

the values it places on hacked up gimmicks

If you catch me using a butcher knife to get the cork out of a wine bottle, feel free to call me a fool. That shouldn't reflect badly on the makers of knives or corkscrews or wine bottles.

i've seen the products of people who write code professionally, with them having learned through years of coding perl, and it is not pretty. lots of them.

I've read a lot of code from people who've never learned a whit about programming. The lesson I take from that experience is that some languages make it easy for people who aren't interested in programming to get things done without having to learn much about programming or design or maintenance or coding standards.

That said, warnings and strictures should have been the language's default behavior for programs, not one-liners.