> Perl receives such an unnecessary amount of hate
I agree. We might deny it, because we are geeks, not fashionistas, but there's such a thing as "cool for geeks" like running Rust code on MacOS with some PostgreSQL sprinkled on, and such a thing as "uncool" like running Perl code over Windows and exchanging CSV files.
Personally, IDGAF: I care about what works the best, not what's cool. I care about performance. I care about the code not breaking due to weird compatibility issues. I care about keeping the stack as simple as possible, because what's simple often works better.
If, god forbid, I need something more complicated than CSV, I reach for sqlite --- which, unfortunately, is starting to become the "cool" option, and therefore might get turned into the proverbial hammer that makes all your problems look like nails!
If your system isn't performant, it's shit. Performant is relative to what you're trying to do and how picky your users are, but at some point you're going to be optimizing for milliseconds without question.
Programming fashions are different from regular fashions in that they're about functional characteristics like reliability and readability. But they're like regular fashions in that they're about social perceptions of those things.
I don't think it's hate. I think it's more "why would I choose Perl over Python?" Perl has a painful syntax, Python greatly improves on this with easy syntax. I don't want to have to relearn the syntax every time I reach for a scripting tool.
> Perl has a painful syntax, Python greatly improves on this with easy syntax.
Regular expressions are way better in Perl. I increasingly find myself going back to Perl for RE heavy projects because it's so cumbersome in Python by comparison.
I'm still undecided on if Perl needing semicolons everywhere is only 'as bad' or 'worse' than Python forcing you to worry about the exact number of tabs/spaces indenting lines, but I'm leaning toward python being easier in that respect.
Still, when I have to get something done quickly, especially if it's an immediate need I don't see having to worry about later, Perl is what I turn to. Everything in Python becomes a "Project".
> Perl has a painful syntax, Python greatly improves on this with easy syntax.
That's a matter of opinion. C style languages are a lot easier for me than whitespace significant languages; my editor will go to the matching bracket with ^G, but I can't do that with whitespace to get to the end of a block. The type sigils are a bit tricky to figure out, but if you spend the time to understand it, it makes sense (but that's also a mater of opinion, too).
Nobody complaining about Perl's syntax is complaining about the "C style". Reading the arcane incantations of magical $ variables gets really old really fast, Perl takes the "if it was hard to figure out then the code must be hard to read" to a whole new level. It's probably the only mainstream non-functional language where you can be absolutely unable to decypher a snippet of code even though you know another C-like language.
> Perl has a painful syntax, Python greatly improves on this with easy syntax.
I use Python and Perl. Some people who like Python want everything to be Python and "hate" anything that isn't Python. It approaches zealotry in some cases.
Perl syntax is expressive and is similar to C, C++, Java, and yes Bash. These are successful languages too despite not being pythonic.
Sure, if you're a fan of Java verbosity. Since PHP 5.3 I don't know why Zend didn't just re-brand PHP as Java Lite. I also don't get why Rasmus allowed the Zend team to get away with it since at heart he's a procedural C guy.
Python was an obscure algorithms language until Google standardized around it, if they hadn’t we wouldn’t be talking about it. Not to say it’s good or bad since that’s silly and evaluating languages is complex and context sensitive, but IMHO Python isn’t popular because it’s great, even if it is.
Badly-written Perl code from the 1990s is not the fault of the language.
It's the fault of the non-programmers who read "Learn Perl in 2 hours and become a millionaire" books, had a massive s*t on a keyboard and started a business with it
And yet those non-programmers who instead "read "Learn Python in 2 hours and become a millionaire" books, had a massive s*t on a keyboard and started a business with it" tend to have ended up with something significantly less horrible to maintain.
It really has to do with the "programmer" and not the language.
Those learn to program and make fast money books were a product of the 1990s, and they appealed to people who cared more about making money than about producing any kind of product.
For example, I once had to fix some code that was supposed to delete files that were sitting in a directory for more than a week.
Rather than do something sane and simple, like look for files where the mtime was less than a cutoff and delete them, it looked for files where the absolute difference between the age and 7 days ago was 0. So it had the side effect of deleting things that were 7 days old, or were less than a day old. It also missed things that happened to be older than 7 days old.
(And nevermind that it was written because people couldn't bother to figure out why files were stuck in the directory.)
The company's codebase was filled with nonsense like that.
The person who wrote that would not have written anything better in Python or anything else.
But from the outside it worked well enough and they made a lot of money.
I agree. We might deny it, because we are geeks, not fashionistas, but there's such a thing as "cool for geeks" like running Rust code on MacOS with some PostgreSQL sprinkled on, and such a thing as "uncool" like running Perl code over Windows and exchanging CSV files.
Personally, IDGAF: I care about what works the best, not what's cool. I care about performance. I care about the code not breaking due to weird compatibility issues. I care about keeping the stack as simple as possible, because what's simple often works better.
If, god forbid, I need something more complicated than CSV, I reach for sqlite --- which, unfortunately, is starting to become the "cool" option, and therefore might get turned into the proverbial hammer that makes all your problems look like nails!