6 ms·
It's articles like this that give Perl a bad reputation.
by ionforce 11y ago
It's articles like this that give Perl a bad reputation.
- vampirechicken 11y agoMostly it was all the terrible code that got written in Perl by the first wave of non-programmers to start building web apps.
- beefhash 11y agoThen the bad reputation of PHP was the second wave of non-programmers building web apps?
- anon4 11y agoSo, same fate as PHP?
- kbenson 11y agoWell, that's half PHP's problem. The other half is that it had very little coherent design in the beginning, which resulted in idiosyncratic an confusing syntax. It focused on a few things Perl did, while ignoring the important context they were housed within (for one, the whole idea of context as Perl implements it, for another being consistent within your own rules). Perl, as confusing as it can seem, has fairly consistent rules that it follows. Learning those and keeping them in mind will generally let you intuit how something is expected to work.
- logicallee 11y agoit's the existence of this that gives Perl a bad reputation. You can write Perl as though it were Python. In the Perl world that's called "baby talk" https://www.google.com/search?q=perl+"baby+talk" https://www.google.com/search?q=perl+"baby+talk" in the real world it's called clean, maintainable code.
- justinator 11y agoI think there's a difference between "baby talk" and using Perl as Perl. You can write Perl that looks like Python, or C, or whatever, but you're missing out on what makes Perl, Perl. "baby talk" Perl is another name for being able to much with Perl, knowing very little of it. Also known as, "Getting your job done". It's up to the individual to learn more about the language, which can be done gradually, much like a natural language. "Clean, maintainable code" in Perl is actually known as, "Modern Perl" [0] [0] http://modernperlbooks.com/ http://modernperlbooks.com/
- logicallee 11y agoyou're wrong though: it's not just up to the individual to learn more about the language, it's also up to to every single person who maintains that code afterward! If you learn something, you force your maintainer to learn it. This is particularly true because many syntax elements are literally impossible to Google. If you didn't happen to learn some idiom (syntax), you just can't deduce or discover what it does, unless a comment precedes it exactly listing the effect. This is just the nature of Perl.
- justinator 11y ago> This is just the nature of Perl. I would encourage you to check out some of the more recent tools and books on Perl that help greatly in making code readable and maintainable, like the Modern Perl book, the Perl Best Practices book or things like Moose - or even if I dare say, Perl 6. The Perl Community has come a long way since when I started in 1999, that's for sure. So has the entire Industry, to be quite honest.
- kbenson 11y agoJust because you seem to have a C-centric view of the world doesn't mean restricting yourself to C-like syntax and code structure is the "correct" way to do it. At that point, there's no reason to be using Perl over Python. You wouldn't complain that people using Haskell were writing unmaintainable code just because it didn't follow the idioms from C-like procedural languages, would you? Why would you lay the same claims at a Perl? Just because it superficially has some similar syntax and you can restrict yourself to that subset? Learn the language you are writing code in, and use idiomatic code for that language.