Hacker News new | ask | show | jobs
by pyre 4945 days ago

  > "don't use perl, it promotes brain rot"

  > and no, i wont revisit my thinking.
"I don't think this is the tool for the job, THEREFORE IT ROTS YOUR BRAIN! If you try to talk to me about that, I will chant, "I'M NOT LISTENING" over and over with my hands on my ears."

Really?

2 comments

"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."

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.

I think the argument might be that it's easy (easier than many languages) to slip into writing bad Perl, which promotes brain rot, it also sounds like it's a discussion he's had many times before... and perhaps isn't too interested in having again.

  > it's easy (easier than many languages) to slip into
  > writing bad Perl
Bad programmers will write bad code no matter the language. I don't like this idea that the language can somehow force people to write better code, or that it should.
See it that way: A bad programmer that can use such a variety of difficult to read symbols in a language (which perl clearly has) will just use all of them and the result will be horrible to read and understand. Also, often times python really has one obivous way to do a specific thing. Last time i was googling for some perl code (i think it was for some array handling) i have found at least 10 equally good totally different way on perlmonks in one thread. That's not bad per se but it promotes that every one uses another line of code and the bad ones choose the lines that may have unintended side effects but work in 90% of the usecases.
> I don't like this idea that the language can somehow force people to write better code

Why is this a bad idea? Do you also object to Perl Critic? Or say having a policy of using Perl Critic?

Usage of Perl Critic and claiming that Perl 'rots your brain' are miles apart.

Also, I don't see anyone claiming that Python will 'rot your brain' because PEP-8 isn't enforced by the language.

You're arguing with a Karma 30 account.

It took some time before the trolls woke up in this thread.

(I'd love to get access to the HN logs and check IPs, to see if the trolls where sloppy with using alternative access and can be identified.)