Perl is the Most Hated Programming Language, Developers Say (theregister.co.uk)
Thomas Claburn, writing for The Register: Developers really dislike Perl, and projects associated with Microsoft, at least among those who volunteer their views through Stack Overflow. The community coding site offers programmers a way to document their technical affinities on their developer story profile pages. Included therein is an input box for tech they'd prefer to avoid. For developers who have chosen to provide testaments of loathing, Perl tops the list of disliked programming languages, followed by Delphi and VBA. The yardstick here consists of the ratio of "likes" and "dislikes" listed in developer story profiles; to merit chart position, the topic or tag in question had to show up in at least 2,000 stories. Further down the down the list of unloved programming language comes PHP, Objective-C, CoffeeScript, and Ruby. In a blog post seen by The Register ahead of its publication today, Stack Overflow data scientist David Robinson said usually there's a relationship between how fast a particular tag is growing and how often it's disliked. "Almost everything disliked by more than 3 per cent of Stories mentioning it is shrinking in Stack Overflow traffic (except for the quite polarizing VBA, which is steady or slightly growing)," said Robinson. "And the least-disliked tags -- R, Rust, TypeScript and Kotlin -- are all among the fast-growing tags (TypeScript and Kotlin growing so quickly they had to be truncated in the plot)."
You have a problem and you think Perl provides the solution. Now you have two problems.
Perl is easy to write, hard to write well.
Sort of like death metal.
It is hated because you have to use independent thought, and have quality of thought, to deliver anything but flaky gibberish.
At the same time, you can do anything with it, and across multiple platforms especially, it is the fastest way to get anything done.
So eat it, Stack Overflow commenters. You're just people googling your way to a paycheck anyway.
Alternative Right.
The CPAN library system is mature, it has ports on a ridiculous number of platforms, and the syntax isn't even particularly awful. If anything, its curse is (anecdotally) that it's everywhere and new-to-perl developers run across old code all the time and struggle to figure out the system it backs. And the fact that perl hacks had (have?) a bad habit of becoming defacto production code.
Why hate, why not dislike. I have been coding for 40 years and never came across a language I hated, just ones that weren't suited for the job. Hey, if the company is going to pay me $75 an hour to code I'll write the app in Sanskrit if they want me to.
The original study is here I found the "polarization of technology" diagram at the bottom even more interesting.
Over the last 40 some odd years I've programmed in dozens of languages. Some I liked, some I was ambivalent about, some I didn't like. But the only language I learned to actually hate is Javascript. Talk about a steaming pile of shit.
Many of us who know perl (and think you're a hypersensitive snowflake of a developer) learned C before we learned Perl.
We're immune to coding horrors.
Having worked in Perl (and many other languages) for about 15 years now, I'm curious how many of those polled actually use Perl regularly.
Whenever I have to introduce someone to my Perl scripts, their first reaction is usually the typical horror, which fades in a few days after they start using it. Yes, there are comments. Yes, there is decent design. No, the regular expressions are not worse than any other implementation. No, the "clever" one-liner you copied off of a PerlMonks golf challenge will not pass review.
Sure, there are a few weird warts on the language ("bless" being the most obvious example), but it's no worse than any other, and significantly better than some of today's much more popular languages. Mostly, I find that Perl just has a bad reputation because it allows you to write ugly code, just like C allows you to corrupt data and Java allows you to consume obscene amounts of memory. The language choice does not excuse being a bad programmer.
You do not have a moral or legal right to do absolutely anything you want.
If you look at the original article -- cobol is there, as the 3rd most hated "tag".
Perl is a wacky language and only bareable if you can handle old school unix stunts, no doubt. It gave birth to PHP, which speaks volumes. I remember reading an OReilly introduction to Perl and laughing at the wackyness. I've done the same with PHP, but I've always respected both. Sort of.
Unlike newfangled fads and desasters like Ruby, Perl is a language that remains usable. Books on Perl from 18 years ago are still valid today, just like with awk, TCL and Emacs Lisp.
Complain all you want about the awkwardness of old-school languages - they still work and many of them run on just about anything that can be powered by electricity. These days I'm still a little reluctant to say which side Javascript will come up on now that Node has it's very own version hodgepodge gumming up the works.
We suffer more in our imagination than in reality. - Seneca
Those people like, and those people use.
People hate what they don't understand.
L.
Personally I prefer Perl over similar scripting languages.
I write in KSH, CSH, Python and Perl regularly... Of the three, Perl is my hands down favorite for a scripting language.
If you are writing applications in Perl though, it sucks. The implementation of objects is obtuse, it isn't geared for User Interfaces (Perl/TK anyone?) and performance is really horrid.
But... I cut my programming teeth on C (K&R, not ANSI) so I'm one of those old grey headed guys who go "tisk tisk" at all those new fangled, it's better because it's new things you young ones think are great.
Now get off my lawn...
"File to fit, pound to insert, paint to match" - Aircraft Maintenance 101
What you have is PTSD (Perl Traumatic Stress Disorder).
Funny, I quite enjoyed writing in Perl 5 and the feeling was empowerment, and the community was excellent. At the time Python was quite immature. Python has grown but Perl 5 is still quite useful.
There is also quite a difference between legacy code and code written today using modern extensions, though it seems people enjoy trashing things, instead of admitting they did not actually learn it.
My experience with the Perl hate is it's usually from younger people (by which I mean anyone under about 40). It violates everything some may have been taught as part of their software engineering program: it's difficult to read, maintain, and support.
But, it exists for a reason and it's ridiculously good at that purpose. If I want to process lots of text, I do not use Python, I whip out perl. And usually it's fine, the little bits of perl here and there that glue the world together aren't usually that egregious to maintain (particularly in context of the overall mechanism it's being used to glue together, usually).
If I'm going to write serious code, code that may formulate the basis for my corporations revenue model or may seriously improve our cost structure, I use a serious language (C/C++, usually) and spend significant amounts of time architecting it properly. The problem is that more and more people are using scripting languages for this purpose, and it's becoming socially acceptable to do so. The slippery slope being loved by children and idiots alike, one might say "I know Perl, let's use that!" and countless innocents are harmed.
Yeah, but once you've been working in a field for a few months, you're no longer a layman. It's easier for a layman to use a Veg-O-Matic than a chef's knife, but anyone who works in the restaurant industry would pick the latter tool.
A computer works using a set of mathematical logic operations. There's no need to dress them up to look like fancy talkin'.
The problem is because people use the wrong tools for things. This is not a definitive list:
Perl is ONLY useful today as a server-sided processing script. If you are using Perl on your front end, you will get dependency hell as your server updates things arbitrarily. Perl breaks super-frequently due to the move from manual updates to automatic updates of third party libraries/ports. Thus if you don't update Perl and everything that uses Perl at the same time, mass-breakage. Thus "Don't update Perl you moron"
To that end PHP is on the other side of that coin. PHP is only useful for websites and nothing else. If you run PHP as a backend script it will typically time out, or run out of memory, because it's literately not designed to live very long. Unfortunately the monkeys that make Wordpress themes, plugins, and "frameworks" for PHP don't understand this. Symfony is popular, Symfony also is a huge fucking pain in the ass. Doctrine, gobbles up memory and gets exponentially slower the longer the process runs.
Thus "Don't update Wordpress" mantra, because good lord there are a lot of shitty plugins and themes. PHP's only saving grace is that they don't break shit to cause dependency hell, they just break API's arbitrarily, thus rendering old PHP code broken until you update it, or abandon it.
Ruby is a poor all-purpose tool. In order to use it with the web, you basically need to have the equivalent of php-fpm for Ruby running, and if your server is exhausted, just like php, it just rolls over and dies. Ruby developers are just like Python developers (next) in that they don't fundamentally understand what they are doing , and leave (crashed) processes running perpetually. At least PHP gets a force-kill after a while. Ruby Gems create another dependency hell. In fact good luck getting Ruby on a CentOS installation, it will be obsolete and broken.
Python, has all the worst of Perl's dependency hell with Ruby's clueless developers. Python simply doesn't exist on the web, but good lord so many "build tools" love to use it, and when it gets depreciated, whole projects that aren't even developed in Python, stop working.
Which leads me to NodeJS/NodeWebkit. Hey it's Javascript, everyone loves javascript. If you're not competent enough to write Javascript, turn in your developers license. Despite that, just like Perl, Ruby and Python, setting up a build environment is an annoying pain in the ass. Stick to the web browser and don't bother with it.
So that covers all the interpreted languages that you will typically run into on the web.
Java is another language that sometimes pops up on servers, but it's more common in finance and math projects, which are usually secretive. Java, just like everything mentioned, breaks shit with every update.
C is the only languages that haven't adopted the "break shit with every update" because C can not be "improved" on any level. Most of what has been added to the C API deals with threading and string handling. At the very basics, anything written in C can compile on everything as long as the platform has the same functions built into the runtime. Which isn't true when cross-compiling between Linux and Windows. Windows doesn't "main()" while Linux has a bunch of posix functions that don't exist on Windows.
Ultimately the reasons all these languages suck comes right back to dependency hell. A language that has a complete API, requiring no libraries, simply doesn't exist, and isn't future proof anyways.
People hate a lot of these languages because they don't adhere to certain programming habits they have, like object oriented "overide-bullshit", abuse of global variables, or strongly typed languages. Thus what should work in X language, doesn't work in Y language, because that language simply does it differently.
Like weakly typed languages are probably supreme, at the expense of runtime performance, because it results in less errors. That said, =, == and === are different. In a strong type language, you can't fuck that up. In a weak type language, you can make mistakes like if(moose=squirrel){blowshitup();} and the script will assume you want to make moose the value of squirrel, AND run blowshitup() regardless of the result. Now if you meant ===, no type conversion.
I'm surprised that PHP isn't more hated.
I *love* perl.
It is C for lazy programmers.
I tend to use it for four distinct problem domains:
* one-offs for data processing (file to file, file to stream, stream to file, stream to stream). When I'm done I don't need it any more
* glue code for complex build processes (think a preprocessor and puppetmaster for G/CMAKE)
* cgi scripts on websites. Taint is an amazing tool for dealing with untrusted user input. The heavy lifting may be done by a back end binary, but the perl script is what lives in the /cgi-bin dir.
* test applications. I do QA and Perl is a godsend for writing fuzzers and mutators. Since it's loosely typed and dynamically allocates/frees memory in a quite sane manner it is able to deal with the wacky data you want fuzzers to be working with.
whois gawk date unzip strip find touch finger mount join nice man top fsck grep eject more yes exit umount sleep dump
As is often the case your doing it wrong.
if you are having problems with Perl being updated when your server updates you are probably using the Perl that was installed as part of your system to run your app.
Perlbrew now makes it simple to run an independent Perl for a single user/service that only updates when you tell it to.
What you describe is no different than if your app uses a c runtime library that is over written by the system during an update.
My experience with the Perl hate is it's usually from younger people (by which I mean anyone under about 40). It violates everything some may have been taught as part of their software engineering program: it's difficult to read, maintain, and support.
The quality of the program structure and the ability to read, maintain and support it are due to the programmer, not Perl. People can write programs well/poorly in any language. Like some others here, I *love* Perl and always endeavor to write clear, well-organized code - like I do in any other programming language - so others can make sense of it -- you know, in case I get hit by a bus tomorrow... It's call being professional.
Hate the programmer, not the programming language.
It must have been something you assimilated. . . .
There is no reason to hate Javascript unless you come from C++/Java "inherit everything and override everything" classes.
Sure there is. If you come from a Smalltalk or Self background, the lack of sane support for numbers is a good reason to hate JavaScript. Smalltalk had a rich set of integer and floating point types, and the default integer kind was automatically promoted to a BigInt object on overflow. In contrast, JavaScript has only one numeric type, a double-precision floating point value. Trying to efficiently represent a 64-bit integer in JavaScript is basically impossible, trying to support arbitrary-precision integers is horrible pain. Lisp and Smalltalk had these from the start.
Then there's the lack of portable support for sane forwarding until very recently. In Smalltalk, if you call a method that doesn't exist, then the invocation is wrapped in an object and passed to the doesNotUnderstand: method. This lets you do proxy things transparently and easily. In JavaScript, this used to be impossible.
Then there's the not-quite-pure-OO nature. Everything is an object, but some of the operations can't be modified and some objects (e.g. Number) can't be subclassed / used as a prototype. Or the fact that you have a single immutable prototype chain. Or the fact that the operators aren't methods (so can't be overloaded) but are weirdly defined for arbitrary types (what is object + object?). Or the weird type coercion that happens, so adding an integer to a string is well defined and has odd results, so 'foo' + 1 + 1 is 'foo11', but 1 + 1 + 'foo' is '2foo' (where, in a sane language, both of these would throw exceptions).
I am TheRaven on Soylent News
Yep - Perl is C for lazy programmers - well maybe not lazy, but programmers that don't want to have to deal with allocating and freeing memory, which is the bane of C and where many of the security problems arise. The other beautiful thing about Perl is no matter how you write your code, the interpreter compiles it into the most efficient form, just like C.
I think hate for Perl stems from the scripters who try to show off their Perl skills, writing the most concise code which is exasperatingly confusing and serves absolutely no purpose. Whether you write verbose code which takes many lines to do the same thing as concise and hard to understand code, at run time they perform exactly the same.
Perl coders have only themselves to blame for the hate; thousands of lines of stupid hard to read code is a nightmare for the person that comes along months or years later and has to work on your code. Stop it damn it, stop it!!!!!
Did you ever wake up in the morning, with a Zombie Woof behind your eyes? -- FZ
Show me a person who hates Perl, and I'll show you a person who doesn't grok regex.
"First they came for the slanderers and i said nothing."
You can write Forth code that is readable. Once you've got the reverse notation figured out it is very simple to deal with. The real problem with Perl is that the same variable name can mean many different things depending upon the prefix character and the context in which it is used. This can lead to a lot of subtle bugs, leads to a steep learning curve, and even a few months of vacation from the language can result in being unable to read one's own code.
On the other hand, Perl was never designed to be a typical computer language. I was berated by Larry Wall over this, he told me "you computer scientists are all alike". His goal was to get a flexible and powerful scripting language that can be used to get the job done. And it does just that - people use Perl because it can get stuff done. When it was new on Unix it was the only thing that could really replace that nasty mix of sh+awk+ed scripting that was common, instead being able to do all of that in a single script, and that led to its extremely fast rise in popularity in the early 90s. Yes, it's an ugly syntax but it's strong underneath, like the Lou Ferrigno of programming languages.