Hacker News new | ask | show | jobs
by 1f60c 2517 days ago
This is not a fair comparison.

You golfed the Python to fit on one line with one-letter variable names, while you took a very literal approach with the Perl code.

2 comments

That's my point, it's not the language itself that changes readability (although personally I find the lack of visual blocks and statement ends in python a right pain). Perl isn't a "write-only language" unless you want it to be.

I'm not a programmer, I'll bash something out to solve a problem and move on, but in general I find reading other peoples perl far easier than reading other peoples python. Maybe that's because I have more experience with perl, because it's well suited for problem solving.

I avoid cpan and pip as much as possible as it makes code much less portable, and unless the module is available in apt (and thus trivial to deploy) it would have to be really compelling to get me to wrap into a custom deb, but that's because I'm not writing products, I'm writing utilities to help run my network.

That was the point they were making, that you can write horribly ugly code in Python if you really put a lot of effort into it, and that you can kinda sorta write readable Perl if you put a lot of effort into it.
If one is marginally literate, one cannot read or write coherently.
You forgot to add:

    ... in any language.