TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Why is Perl considered a bad language?

4 pointsby thatwasunusualalmost 3 years ago
I just saw this post[0] on reddit.com&#x2F;r&#x2F;perl, and this is probably the most simplisitic code I&#x27;ve seen in a while. How is this - or similar - done in other languages?<p>[0] https:&#x2F;&#x2F;www.reddit.com&#x2F;r&#x2F;perl&#x2F;comments&#x2F;v4kukp&#x2F;code_help_needed&#x2F;ib5ggdt&#x2F;

11 comments

LinuxBenderalmost 3 years ago
I am not a professional developer so take my opinion with a grain of salt. I do not believe that <i>language</i> vs <i>language</i> or <i>why is language X bad</i> entirely useful. Those arguments are usually pitting downstream effects against one another.<p>Rather I believe that a language is as good as its founding development community in terms of cooperation, incitement of creativity, inclusiveness, supporting new developers both hobbyists and professional alike and things along this line. I believe those are foundational principals and if those are lacking everything else will be weak and only get weaker with time. Politics, cliques, divisive or elitist behavior will creep in and the rest become downstream artifacts. I witnessed some of this amongst the Perl Monks and it was not surprising that their community stagnated and became divided. This is just my opinion however and I don&#x27;t code for a living, just for fun. I still write Perl code for my own hobbies.
adamrmcdalmost 3 years ago
20 years ago this was my go-to language. Its CLI was very easy to develop your own system to combine grep, sed, awk, uniq, etc into awesome one liners, and for producing more complex file and network manipulation techniques.<p>One huge challenge I had was the inability to read other people&#x27;s Perl code. There were dozens of ways to solve the same problem, and I had extreme difficulty reconciling my own understanding of &quot;perl&quot; with other people&#x27;s code.
ajkachnicalmost 3 years ago
Bad language is a pretty subjective. Perl often gets a bad wrap because it can be hard to read and terse, but that doesn’t necessarily make it bad. It could be good in a “writing a quick script” circumstance.<p>Somewhat related to this, enjoy this article[0] titled “93% of Paint Splatters are Valid Perl Programs”<p>[0] <a href="https:&#x2F;&#x2F;www.mcmillen.dev&#x2F;sigbovik&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.mcmillen.dev&#x2F;sigbovik&#x2F;</a>
h2odragonalmost 3 years ago
It&#x27;s not a &quot;bad&quot; language, others are more suited for &quot;public&quot; development where you want others to read the code someday. Where expressing your intent to the computer is all you need, Perl is still unmatched, I think. When you need to please a wider audience then other languages have been found more popularly palatable.
cafardalmost 3 years ago
I pulled a copy of <i>Perl Best Practices</i> off a shelf of free books the other week, and have been wishing I had bought a copy when it came out.<p>It is easy to write truly awful code in Perl. But if you&#x27;ve never seen truly awful code in any other language, you&#x27;ve lived a sheltered life.
khedoros1almost 3 years ago
&gt; How is this - or similar - done in other languages?<p>In the sense of just generating a QR code and outputting to PNG, or building it as a CGI script?<p>This is what I came up with in Python and Go for the former: <a href="https:&#x2F;&#x2F;pastebin.com&#x2F;NemaaCzF" rel="nofollow">https:&#x2F;&#x2F;pastebin.com&#x2F;NemaaCzF</a>
icedchaialmost 3 years ago
Let&#x27;s see: terse syntax, sigils ($str, @array, %hash), weak typing. Many years ago (like 10+) I used to use it for one off scripts, but I now use Python for those. 20+ years ago, I used it for CGI scripts, but that paradigm is basically totally obsolete.
stevenalowealmost 3 years ago
Using Perl caused me to wear the lettering off the Shift keys on a new keyboard in one month
alex14fralmost 3 years ago
It is not soydev-approved :)
评论 #31623767 未加载
tmalyalmost 3 years ago
Modern Perl with Mouse and Moo is pretty clean looking.<p>I still maintain Perl code I wrote at work 10 years ago.<p>Now most of my work has shifted to Go and Python.
usr1106almost 3 years ago
Because unreadable code is easy and natural to write.<p>(like bad, unreadable can be a subjective property)