Hacker News new | ask | show | jobs
by buster 4945 days ago
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.

1 comments

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.