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)."
...is worse.
You have a problem and you think Perl provides the solution. Now you have two problems.
I guess it's gone that far out of the mainstream
Build a Man a Fire, and He'll Be Warm for a Day. Set a Man on Fire, and He'll Be Warm for the Rest of His Life.
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.
It is surprising to me that enough developers have used Perl for it to be the most hated language. I would have guessed JavaScript, or maybe VB (#4 & #2 most hated).
-- All that is necessary for the triumph of evil is that good men do nothing. -- Edmund Burke
...but its fanboys are by far the most annoying.
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.
isn't that the place were the copy-pasta programmers and a bunch of college kids hang around, just because documentation scares them?
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.
Perl just looks like line noise because of the heavy use of regular expressions. Java actually sucks across multiple vectors, for example, everything is supposed to be an object. Oh yeah, except for all the built-in scalar types etc... STUPID. You also see huge amounts of boilerplate code in Java. Their garbage collection just makes the coder dumber and still eats memory (ie.. nothing reaps until it goes out of scope - which is often the source of memory being tied up just like a leak would do just via a different route). Java is also a sysadmin's most hated language because you are constantly dealing with clueless Indians and other folks on Java's level and they have no idea how to tune their app other than "Give me everything the system has." That usually includes any memory you were hoping to use for the OS caches and kernel. Finally, Java's "promise" of write once run everywhere is a total lie. It's more like write once run on the exact same version and rig as the developer and it'll work if you are really really freakin' lucky. News flash: C is actually the most portable language. You buy a devkit you can bet someone has a C compiler for that platform. A Java interpreter comes way later. C is everywhere, java is a poorly implemented pipe dream. Perl is just a utility language. If you write more than 500 lines of Perl you are probably doing it wrong.
I don't get the Delphi hate, to be honest. It is a pretty good language, comfortable to write. Well, the last Delphi I have used was Delphi 7, years ago, but from what I've heard it has become better rather than worse in the later versions.
"It's such a fine line between stupid and clever" -- David St. Hubbins, Spinal Tap
They never used pl/sql for all they development like out stupid development team... including all (buzzword) web 2.0 tools.
PL/SQL is awful compared to T-SQL. Glaring example, T-SQL table variables can be used anywhere like any other table and the performance is optimized. In PL/SQL, should I use a collection, a varray, etc. because they are conceptually the same but can only be used in certain contexts because Oracle's PL/SQL design is a Frankenstein monstrosity. Another thing that drives me nuts is MSSQL's query optimizer very rarely ever gets it wrong but you routinely have to specify optimizer hints in Oracle because their optimizer often picks a bad execution plan. And when it does that, it picks a REALLY bad one.
We'll make great pets
Given Oracle's licensing enforcement, choosing their database is usually a major failure in your execution plan all on its own.
How about most irrelevant language? Why measure the level of hate towards something that is obsolete? I know let's do a study about how many people hate using looms or how many people hate commuting to work on horseback because that's useful information.
We'll make great pets
If you want to have fun then ask the developers who "love" all of these scripting languages what kind of projects they have been working on. Perl is still great for what it was designed for--text file parsing and processing. Just like FORTRAN and COBOL in their own lucrative, highly specialized, niches. Delphi was superseded by C# when Hejlsberg moved to Microsoft. And VBA is kinda left behind but still the best option if you are one of the (99%?) working people who use Microsoft Office.
Having tried to like Java since the late '90s, I can't imagine there's a language in use less intuitive or helpful.
I'll need to check out Perl. This should be interesting.
Last language I learned was Whitespace.
The Kai's Semi-Updated Website Thingy
Is even worse than Ruby.
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
I gotta say, I'm shocked by this finding. I don't have enough experience with Perl to personally hate it or love it, but if you had given me 10 guesses which programming language would have been the absolute most hated - especially in a list that includes Visual Basic, PHP, Cobol, C#, ColdFusion, Pascal and Java - I don't think Perl would have been any of them.
Proud neuron in the Slashdot hivemind since 2002.
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 usual experience with Perl goes like this: We can't process data this year can you help us? Oh, this is a 20-year-old Perl script. Let the biopsy begin.
What's wrong with C, you insensitive clod?!
Maybe it's because I only use VBA along with Excel, but I actually really don't mind it... I can do some pretty nifty shit with it. That said, every experience I had with COBOL was fucking trash.
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.
Mostly people who are choosing their language aren't going to hate it. We're more likely to hate languages from projects we inherited, because we're forced to work with it.
-Dave
Programmers have strong preferences about programming languages, and the popularity of languages rises and falls like the rankings of Top 40 pop tunes. Film at eleven.
Proud member of the Weirdo-American community.
Execution speed is fast, and coding is succinct. The OO (Object Oriented) stuff is a bit naff, but that was just a bolt on. OO less Perl probably even more efficient.
Me too. I actually like Perl, I find its regular expression stuff quite powerful for scripting. Javascript and PHP are worse in my opinion, they have more or less the same problems as Perl, without any real strong point. However, if there is one language I hate, that is VBScript: terribly confusing, painfully slow and cumbersome for many simple tasks (like regular expressions), yet it is pushed down your throat by Excel lovers office managers.
I worked quite a lot with C (both ANSI and C99) before I ever touched Perl, but this didn't stop my first experience dealing with it feeling like watching the lawnmower scene from Steve Jackson's Braindead* (or Dead Alive as it was called in some markets).
I don't know about you, but whoever designed the language has either got a very deranged sense of humor or is just a flat out sadist.
*For those not familiar with the scene: https://www.youtube.com/watch?...
"Why should I want to make anything up? Life's bad enough as it is without wanting to invent any more of it."
I'm surprised that PHP isn't more hated.
There is no reason to hate Javascript unless you come from C++/Java "inherit everything and override everything" classes.
Javascript simply is easier for people to program in without making arbitrary mistakes. A lot of what is hated about Javascript is the browser DOM. Not Javascript itself. Which leads me to the thing I have the most in Javascript, JQuery. Want to see how stupid JQuery people are? Ask them to do something simple without using JQuery. So many times I see a 300KB library loaded to do one thing that could be done with two lines of normal Javascript.
VB rightfully deserves any hate thrown at it because it's functionally awful.
Perl probably gets a lot of hate because of how much it breaks with every update. It's actually really easy to understand, and most of the syntax rules you use in Perl are the same as PHP. However where PHP shines is in not needing any third party libraries to do just about everything. Everything comes with PHP, unlike Perl which nothing comes with it, thus the oodles of different, broken, obsolete libraries to do "simple" things you probably should have just done in Perl to begin with, without the library.
C sucks at string handling. Thus perl.
I think perl is great. Python is the on that surprises me. Any language that derives significance from white space has serious issues (Makefile, Fortran and Python... all shitty to program.)
I love perl. What I don't love is the deliberately obfuscated perl written by someone trying to be clever and/or indispensible by writing code only they can (quickly) understand. A quick down-and-dirty perl script is one thing, using it in reusable scripts is just immature and pointless. Especially those who refuse to document their code.
THAT is the part I detest.
There is no reason to hate Javascript unless you come from C++/Java "inherit everything and override everything" classes.
I never said I hated it, just that I would have guessed it was the most hated. Although it isn't my favorite language I really like JavaScript.
Want to see how stupid JQuery people are? Ask them to do something simple without using JQuery. So many times I see a 300KB library loaded to do one thing that could be done with two lines of normal Javascript.
Most senior level front end developers I know nearly refuse to write boilerplate JavaScript because of browser compatibility concerns. Using a library where someone else deals with those issues is generally favorable, even if it means needing to load an 82 KB library for a single function call. The time it takes a developer to decide if those 82 KB are necessary is nearly always more valuable than a few dozen kilobyte download which gets cached.
-- All that is necessary for the triumph of evil is that good men do nothing. -- Edmund Burke
My biggest problem I find with Perl is that there were SO many ways to express a similar operations, conditionals, etc. While this may be nice for single developer projects, it is utter hell if someone has to read that code. This has happened because of Perl's long life and its iterations to add more and more contemporary programming concepts. This has made it possible (and thus it will happen) to make Perl code a spaghetti mess of syntaxes. This makes perl code difficult to read much less grok.
I'm not saying Perl is the only offender of this. PHP has the same issue with its older functional programming syntax style and its OOP syntax. But PHP has kept it mainly to two styles. Perl has way too many styles so people get lots in syntax and find it hard fallow the code.
No good deed goes unpunished.
It programs for ALL the major platforms out there currently pretty much (yes, Linux now again too) https://www.embarcadero.com/products/delphi/ & from what I see? Today's "programmer" @ Stack Overflow etc. are copycat noobs (yes, there's a few folks there that KNOW THEIR STUFF, but they are by FAR a minority carrying the weight of the noobz there that think "only OUR language is good" well bullshit - Python, Perl etc. don't do a FRACTION of what Delphi can on its own).
APK
P.S.=> I program in a dozen languages fluently - Delphi knocks the piss out of most bigtime (even C++) minus their flaws (C buffer overflow null-terminated strings for one) & stole me away from MSVC++ & VB when in a competing trade rag of all places, Visual Basic Programmer's Journal Sept/Oct 1997 issue titled "Inside the VB5 compiler" (watered down MSVC++ one) Delphi took 4/6 tests 1st place (especially math & strings where it LITERALLY DOUBLED & then some MSVC++ full, & every program does those tasks)... apk
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
I am a Java developer working with a .NET team. They do the **exact** same thing with .NET. <old-coot-voice>And back in my day, they used C++ and shit randomly blew up because they didn't understand pointers, but at least we had control over memory!</old-coot-voice>
But a lot of us who use Java actually do now how to write Java code that typically doesn't leak object references and can garbage collect just fine. Pay bananas, and don't be surprised when all you get are monkeys.
You are more full of shit than an abandoned outhouse. I could run this by every Java developer I've met in the last 10 years and they'd ask what controlled substance you're high on because most of us haven't worked on even a single project where the deployment target and the workstations matched up either in OS or JVM version. The JVM is not perfect, but Java binaries are extremely portable if you fully leverage the appropriate APIs to make resource access platform agnostic. (Most of you could be a demotivator: "Hard codes Windows file path, claims it's not cross-platform.")
You are going into a new company, they say they have two older systems ; one written in Perl, one in Javascript. They want you to maintain and update one...
Which do you choose?
The answer to that for most devs would be Javascript, I think.
Perl itself is OK in my view, I don't mind working in it. But from experience the problem with languages like Perl is that it can more greatly deviate with how someone else might write Perl than yourself, so whenever you encounter Perl it seems even more alien and befuddling than it might otherwise.
It's interesting that Javascript, even with all the type flexibility does not seem to run into this issue as much.
"There is more worth loving than we have strength to love." - Brian Jay Stanley
Once upon a time, it might have been the least painful way of writing scripts but these days we have Ruby, Python, NodeJS and a bunch of others. I'd be hard pressed to want to use Perl unless there was some material reason that every other scripting language was unsuitable.
Sounds like he hit a Wall.
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. . . .
I'm old school, but I still love Perl (5, not 6). I have never had a problem that I had Perl getting in my way of what I was trying to do. I have never even encountered a problem that I couldn't solve with it. CPAN is its big selling point, a ton of code is already written (and mostly debugged). The problem is the language (as in a real language, written by a linguist) is so flexible, anyone can write it a myriad of ways. There is bad perl, good perl, terse perl, line noise perl, and going for broke golf perl. This is not good for corporate in general, and now that most of my generation of Perl has moved on or is getting older, good programmers are hard to find. The curve for perl was steep, but thankfully, the regular expressions, and a lot of the formatting styles are the same in a lot of other languages so all is not lost. Perl is dead, long live Perl!
That's a feature, not a problem. Pointer arithmetic is probably both the best(and worst) feature of C.
What you have is PTSD (Perl Traumatic Stress Disorder).
Actually, Python Tab Stress Disorder. Our last programmer was taken away, still in a cold sweat, weeping about white-space, begging for a curly-brace. We're going to get him one for Christmas - a stuffed curly-brace, he's not allowed to have sharp objects on the ward.
It must have been something you assimilated. . . .
> remember PHP initially stood for "Perl Hypertext Preprocessor".
> Took everything about Perl that was good and shot it, leaving only the bad bits behind.
Historically, it did the opposite. The youth tend to be disparaging about successful efforts they can't replicate.
Often wrong but never in doubt.
I am Jack9.
Everyone knows me.
It sounds like you're not merely trying to write some program in two lines, but taking on the big job of interfacing with a web browser , i.e. one of the strangely most-complicated, shitty-APIed software that exists in our world. I think that's what AC meant by "A lot of what is hated about Javascript is the browser DOM."
(That said, I think Javascript is kind of "eww" because I like classes and Javascript is weird.)
"Believe me!" -- Donald Trump
You just described why I hate front end development. I got caught up in the Browser Wars of the late 90's and I said "never again". And I have been able to do so for years.
putting the 'B' in LGBTQ+
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
Some of those are obscure to the current generation of developers. The ones who frequently end up on StackOverflow trying to get someone to do their homework for them, or worse lied there way into a job bragging about their mad 1337 {Java|C#|Perl|JavaScript|JSNode|Ruby| } sk!11z. Hence the fact that these polls, they are not surveys, are bogus. And why the hate list is tilted against older non-trendy languages that are still functional depending on the problem domain.
putting the 'B' in LGBTQ+
It could be argued that C does not really have string handling. Hence what would suck at string handling is the coder, i.e. you.
Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
so C# is out as a second career. (sorry I couldn't resist :)
putting the 'B' in LGBTQ+
If you think Perl is the worst from all of the programming languages, you probably don't recognize its true strengths (and weaknesses) in many of todays computing environments. Compared to bunch of proprietary languages in variety of enterprise legacy environments, Perl would be amazing tool to script and automate all kind of functions and repeating functions compared to the native scripting environments.
Perl is the most hated language by people who have never heard of ruby. Fixed the title for you. You're welcome, Slashdot.
Something about these results smells funny.
Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
It originally stood for "Personal Home Page" -- as it was written for a guy's personal home page.
This is basically it.
I use C for things that have to go fast.
I use perl for things that have to deal with text.
I write a lot of Perl, and almost all of it has regexes throughout (monitoring Oracle logs, data mining, etc.) The last time I heard, Perl and Java had the most comprehensive implementation of the Regular Expression engine of all languages. It's well known for its data munging abilities. So I wonder if it's Perl that people hate, or the regexes that Perl is supporting?
https://www.regular-expression...
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
You all want your hands held when coding.
I used to code assembler on 2 byte registers, and I liked it.
Now go take your punchcards before I throw them on the floor in disgust.
-- Tigger warning: This post may contain tiggers! --
Oh I don't disagree with you at all here. I will say that C's "string handling" is probably one of the most common sources of vulnerabilities in C programs.
With that said, C is still my favorite language. Even if my feet have long ago been blown off and I've managed to hang myself with the excessive amount of rope it gives me.
A coworker once said to me "Perl code looks a lot like C code, doesn't it?"
To which I replied "Perl code can look like C code, but it doesn't have to. *My* Perl code looks like C code. Perl code can look like line noise."
I am not your blowing wind, I am the lightning.
"and projects associated with Microsoft"
what does that even mean?
why not just say "Visual Basic" instead, or "Projects associated with Linux" (for Perl)?
The journalistic hackery at the register is as unapologetic as usual.
I always thought Perl was an abomination. Mind you I once got roped into writing some test code in Perl. And it was surprisingly OK. The code was structured into a bunch of functions and it was like writing C. Well except Perl at that point had no function prototypes so you had to manually make sure when you called something you passed things in the right order.
Another Perlism that I disliked was what happens when you pass two arrays and some scalars into a function they all get scrunched into one big list. So you need to pass by reference explicitly
http://www.perlmonks.org/?node...
But you know what? Apart form that it wasn't too bad. These days I mostly use Python for scripting, but Perl is honestly not a bad language.
I think it's like VBScript. VBScript is terrible language but the last time I used that I was mostly building up a bunch of strings to pass into MS-SQL. Similarly the last time I used Perl it was actually generating C code which was then compiled and run. And a Perl script checked the logs to see which tests had passed. Basically the system was a way to automate testing code on a bunch of embedded platforms and some emulated ones to make sure nothing broke. Perl was actually OK for that.
echo -e 'global _start\n _start:\n mov eax, 2\n int 80h\n jmp _start' > a.asm; nasm a.asm -f elf; ld a.o -o a;
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."
> It could be argued that C does not really have string handling.
Really??
While's C's string processing leave a lot to desire, the basics ARE there.
My experience with the Perl hate is it's usually from younger people (by which I mean anyone under about 40).
I suspect much of the perl hate is from people who haven't actually learned perl but at some point in time were asked to update or troubleshoot a perl script.
There are languages which a "non-speaker" can often get the gist of and troubleshoot existing code to some degree. Perl is not one of them. Then again, those easy-to-read languages seem to give novice coders a false sense of adequacy - which may be the reason we see so many security exploits in code using them. When was the last time you saw a perl exploit?
#DeleteChrome
If I want to process lots of text, I do not use Python or Perl, I whip out PHP.
PHP is as good a command-line language as it is a web server language and whatever you can write in Perl or Python, I can write in half the time in PHP. PHP arrays are superior in every way for data processing because, under the hood, they combine the power of a hash and a doubly-linked list that allows both integer and string keys in the same array while maintaining fast access + item insertion order for near O(1) operations. No other scripting language comes close.
PHP devs tend to produce readable code - far more readable than what Perl devs produce.
I whip out C++ *without* STL (i.e. no std::'s for me TYVM) when I need sheer performance or direct access to rare OS-level functionality. However, you can also write extensions for PHP in C to handle the heavy performance-sensitive bits and expose the new functionality to userland.
Perl is a crossover language, it's used in so many different contexts. JavaScript is essentially only web development, VB is Windows only, etc. Those are niche languages.
But Perl is portable to many different systems, can be used for web server back ends, can be used for data analysis, textual manipulation, a quick mock-up language, command line scripting, sysadmin scripting, build systems, full applications, etc.
Show me a person who hates Perl, and I'll show you a person who doesn't grok regex.
That's probably a good part of it. Me, I love regex, and I like perl a lot.
When I'm writing a perl program, I do *not* use the fiendish tricks that I use when trying to win a round of "perl golf". Clear code with comments.
Perl is great to write - you can just bang out some shit fast and it probably works. It's certainly better than using bash or sed for the same problem space.
The hell comes if you ever have to look at what you crapped out ever again. Six months later and it's unintelligible. Or worse, you have to use what someone else crapped out.
Yes, you can write really good, really clean, really maintainable perl if you want to put in some effort - I've seen it twice in my entire career.
I really wish Smalltalk had become more popular. As it is, Ruby comes closest to being a textual version of Smalltalk as a language, even if it's not Smalltalk as a system. So many people point to one language or the other as the one true way to handle multiple inheritance, but I like that Smalltalk just refuses to do it, thus problem solved. Yet at the same time it is perfectly capable to add any of the various kinds of multiple inheritance into Smalltalk if you were so twistedly inclined to do so. There is nothing else out there that's I could call a "pure" OO language or system than Smalltalk or Self.
I got *a lot* of productivity out of perl when it was popular. It's true that a programmer can write horribly obscure perl code. But, a good, clean, considerate programmer who comments well can write very maintainable and understandable code. Also perl itself, in spite of its complexity under the hood, is amazingly bug-free.
Nothing wrong with C or perl as long as you use vi instead of emacs to edit it.
Its the best text processing language, period.
Indeed. A regex is almost always more clear than corresponding procedural code that doesn't use a regex.
"First they came for the slanderers and i said nothing."
I got *a lot* of productivity out of perl when it was popular.
The productivity of a programmer doesn't depend on how popular the programming language he uses is, it depends on his skill and the suitability of the language to the task.
Don't let a website that thinks you can determine the popularity of a programming language from the number of up-and-down votes on stories related to it change your estimation of your productivity with it. Flamebait written about perl here would get down-mods; that doesn't change the value of perl itself.
Perl simply throws your incompetence straight in your face, while other languages will not hurt your ego so much.
Yes guys & gals, complex constructs will take time to grasp. In return, Perl allows to write good & compact code and professionals will understand it much quicker compared to other languages, simply due to a smaller amount of code they have to read.
The usual remark I make about Perl is that valid Perl code is indistinguishable from modem noise. But then, I also say that Python is like somebody combined C++ and Perl. In Perl, everything is a string, whereas in Python, everything is an object -- even integers. This makes for a very inefficient language.
I've abandoned my search for truth; now I'm just looking for some useful delusions.
Sadly, C# is actually a good language, once you understand it, it looks like Microsoft took all the common mistakes that programmers make using C++ and tried to design a language where all those mistakes were impossible. So, if you got idiot programmers, you're better off having them write C# and managed code. The down side, of course, is that locks you into the Microsoft ecosystem. Too bad Mono never got anywhere.
I've abandoned my search for truth; now I'm just looking for some useful delusions.
Well, the second one is just the writer pointing out they're using the implicit operators (usually you don't need to spell out @_ or $_), eg:
$foo = shift;
is equivalent to
$foo = shift @_;
and
foreach @someAry{print;}
is equivalent to
foreach @someAry{print $_;}
is equivalent to
foreach $foo @someAry{print $foo;}
now, in *most* code it is rude to the people that come after you and who may not have a deep grasp of Perl's oddities to use all the implicit stuff, so you spell it out with $_ and such. In something really buried that last foreach loop will be slower because it has to do an assignment, while the first two will be faster. This only counts when you're looking at *massive* loop counts, at which point... why are you using a scripting language again?
Lack of comments, and shit code is on the coder, not the language. I can write unmaintainable C/C++ just as easily as I can Perl, easier even, because I can have some seriously hidden interactions that I rely on but that you have *no* way of knowing interact (like mallocing the same memory block to two different structs and using them as a conversion pipe).
As to the TIMTOWTDI issue, that's helpful and hurtful, and a lot is because of how the language is assembled I think.
whois gawk date unzip strip find touch finger mount join nice man top fsck grep eject more yes exit umount sleep dump
Yes, indentation being significant is annoying as hell, but I just edit in SciTE and constantly run the syntax checker which flags any indentation mistakes, which usually occur when doing cut/paste edits. I also found I get C++ and Python confused, e.g. writing "break;" in Python. Then I grepped through the existing code, and found out the previous author did it a lot more than I did! (For the record, a semicolon is also a statement separator in Python, so it does no harm. The difference is in C++ only the semicolon is a statement separator, whereas in Python both newline and semicolon are statement separators. Having coded C for over 30 years, I have a bias towards the C/C++ way of doing things.)
I've abandoned my search for truth; now I'm just looking for some useful delusions.
I'm well under 40 and don't get the Perl hate. Use it everyday in physical design flow developement/QA and implementation.
Perl violates basic aspects of scope. I once pulled in a fellow programmer's library for a few functions which I added to my loop. It totally broke the whole thing. Why? Because a next statement in a called function affected the loop control in the calling function. That simply shows that lack of scope is broken at the language level - and that's inexcusable.
Perl makes sloppy quick scripts hard, but it makes doing the right thing in any larger project with a maintenance cycle hard. Globals are easy. Restricted scope and managed exposure between modules is hard. That's exactly the opposite of what it should be.
It is far easier to write in Python and turn to the appropriate PyPy, Cython, or however you want to wrap Rust or C++ into it where you need to.
I'll take engineering around clear design over a language designed by linguists than by programmers anyday!
Alternate explanation - they say that R, Rust, Typescript and Kotlin are the fastest growing tags on StackOverflow, therefore they must be the most liked. It seems to me that a more likely explanation is that they're newer and more confusing, and more people have questions about them. The traffic for questions about, say, Perl, is starting to taper off because it's been around so long that all of the obvious questions have already been asked and answered, and a lot of the bugs have been worked out of the recent versions.
Proud neuron in the Slashdot hivemind since 2002.
Yeah I sort of suspect that the "least hated" list just correlates with the "least known".
Proud neuron in the Slashdot hivemind since 2002.
I was in college taking first year Computer Science classes in C/C++ when I found my first Perl book, it was just warm fuzzies flowing off the pages compared to the crap we were subjected to in class!
Perl was my first scripting language, and quickly moved to PHP as it's easier for web based development. This was in the late 90's. Now I've moved on to bigger, better languages, but there is a special place in my heart for Perl.
I love Perl because everyone hates it. Perl is now like 1/10th of my income, as I maintain some legacy applications for a few companies that I didn't build. They don't mind when I charge $100/hr (yes I'm aware I could probably charge more) to make changes or tweaks, because other developers just throw their hands up in the air and claim they need new software, which would cost a lot more. I understand there will come a day they will decide they need new software, but if they are happy with the service I provide, I will be the first place they come to get a quote to replace it.
In fact, a couple Perl projects have moved to new systems, some developed by me, and some off the shelf applications. Remember, best tool for the job and all that jazz.
Again, I love Perl. There are thousands of systems utilizing it, and the more people that hate it and refuse to use it means more money for me. :-)
Did I mention I'm not even 30 years old?
This is why I switched from Perl to Ruby.
My old Perl code looked like line noise. To me, after 6 months. Oh, I could clean it up, but it took me a lot of effort.
My Ruby code looks a lot like C; which is nice because half my methods are also implemented in C. And I can easily read it, even years later.
There is so much overlap between the use cases of Perl and Ruby it just didn't make sense to me to keep using Perl since I suck at making it maintainable; it is just so expressive, it is too easy to let the needs of the use case bleed into the code organization. It feels too elegant while doing that sort of thing; it can feel stifling to refuse to use that power when it is at your fingertips.
If most of my code was one-liners I'd have stuck with Perl.
That's funny, and probably true; those of us who don't use Perl but use a lot of regular expressions are unlikely to feel the hate.
That said, even though I used to use Perl on a daily basis since I don't use it frequently anymore I'm more likely to reach for sed than perl on the command line if I need to edit a file with a regex.
Actually, even when I used Perl a lot I would often still use sed to make small source changes across the whole project.
A few times in my life I've been asked to debug PHP. 100% of the time it was a regex bug and I never had to learn any PHP. :)
Probably over 90% of the SQL bugs I get are regex-related, too.
Perhaps the generalized rule is, "People who hate Perl should stay inside their wheelhouse."
Be warned, that was true about Javascript when you learned it, but it stopped being true about 10 years ago and now they're using it everywhere. Sad but true!
That's funny, and probably true; those of us who don't use Perl but use a lot of regular expressions are unlikely to feel the hate.
It seems intuitively true, but the hypothesis was developed entirely empirically: at one point I realized that everyone I know who dislikes Perl also doesn't understand regular expressions. Since then, I've continued asking people when the topic comes up. So far I haven't found an exception.
"First they came for the slanderers and i said nothing."
I don't mind figuring out somebody else's old Perl script; I expect any code NIH to suck as bad as the rest of the NIH code!
What really torques my twizzle about Perl is looking at my own old code, and realizing, "I spent a whole day making this code this ugly, and I was really happy with how perfectly the semantics matched the use case and how clear everything was. I just want to hide under a rock."
I know it is possible to write clear Perl. I've even seen such code. But high level languages are supposed to be easier, and for me it is easier to write clear C than clear Perl. And Ruby, no problem.
Figuring out what old code does? Not that hard. Tolerating looking at it? Harder.
Javascript is an extremely underrated, and generally really great language.
Perl is an abomination.
Most of those other languages tend to either enforce some form of readability or you have to have been trying hard to make it unreadable. The problem is that half of perl's core features encourage you to write code that is difficult or impossible to maintain, and code maintenance is one of the most important phases of actually coding.
But, a good, clean, considerate programmer who comments well can write very maintainable and understandable code.
This is true of almost any programming language. The issue is the extent to which the language makes this more or less difficult to do. Perl pretty much makes it as hard as it's possible to make it.
It just goes to show, some people don't know what they're talking about, but they do know what to say.
Same here... I have a lot of Perl stuff running under cgi-bin (some of it over 20 years old) and have never ever had it break because of a system update. I had one long term running script break when a bit was flipped on the drive though.
Back in the day I had evolved a string handling library for my c programming. Then when someone showed my Perl I realized that: Hey here is much better string handling library and it is available wherever I go.
What really torques my twizzle about Perl is looking at my own old code, and realizing, "I spent a whole day making this code this ugly, and I was really happy with how perfectly the semantics matched the use case and how clear everything was. I just want to hide under a rock."
Why do people think this is unique to perl? I get this with whatever I do. It's time we all realise that what we do in the moment gave us joy and warm fuzzies. Now that moment has past and we've grown more intelligent and new and different problems have come along, we have forgotten all the difficulties that we had at the time that led to the brilliant piece of work we produced.
Perl/FCGI has been good to me, applications are easy to manage and strace. I don't see that python is any better, but has a smaller library, so no need to move to that for little return. If anything, the regex is more work (no $1..9 or =~ m||; etc).
I get as frustrated looking at my Java code as I do my perl or C. When I wrote it though, it fixed the world.
Why UNIX?
I have to say, it's quite cathartic to hear so many people voice identical experiences with revisited their own Perl code!
Nothing? Really?
text++ advances the pointer, so the output is 'ello World'.
Note:
#include
void main() {
char *text = "Hello World";
printf( "%p\n", text );
text++;
printf("%s\n", text);
printf( "%p\n", text );
}
0x55c97e4047d4
ello World
0x55c97e4047d5
Why UNIX?
I like all variable having a $. Makes them easy to spot when looking at someone else's code. The lines ending in semi-colons is a little annoying. As much as I think Python is cool, if I see one more damn indentation error when I execute a script, I am going to scream. I'm not a programmer. Just a guy that writes scripts to get my job done. And the top of my list is vbscript. I would rather script in anything other than vbscript.
I use PL/pgSQL and it is great! But PL/Ruby is better.
I'm not actually sure what you said though.
I was stuck using the Microsoft variant one time and it was hell, it was like programming a donkey... every other line telling it GO GO GO GO GO and its like, do these fuckers realize that every other company has SQL scripting that just keeps going? Like, automatically, from one line of code, on to the next line of code?
Why do people think this is unique to perl? I get this with whatever I do.
That's the point, for many of us we don't get that feeling using other languages.
Hate the programmer, not the programming language.
Applies to all things except Javascript.
Well, okay, a bad programmer can make Javascript worse, but still...
Why do people think this is unique to perl? I get this with whatever I do.
That's the point, for many of us we don't get that feeling using other languages.
To me, I think people are using it as an excuse to blame their former, less experienced-self and use shiny new things as an excuse to redo bad work. A good craftsman does not blame his tools. Perl as a language is particularly good at text processing. Sanitizing network input (web forms, etc) is very trivial, and few keystrokes. Applying a regex to string inputs in PHP/Python/... is less simple. There's also 'taint' mode to enforce and weeds out a layer of injection.
Perhaps some people have forgotten things like MAGIC_QUOTES and other nasties that made PHP a joke language.
Why UNIX?
No, when a good craftsman buys a new tool and it is better than the old one, he says, "gosh, this new tool is better than the old one." He doesn't go all macho-moron and insist, "meh, tools are all the same, no difference."
Actually, the master craftsman is almost certainly a master in tools, and probably has tool preferences.
Now I see what you did there. We're talking programming languages here. Text editor is whatever rocks your boat. I disagree with you, but that's not the point.
(Except the use of gdb is so much easier (IMHO) in Emacs, but that's only because I spend a bit of time setting it up the first time I log into a new environment)
I usually hate PERL, always have. The "many ways to do something" is its biggest strength and worst weakness. However, I admit sometimes it's the best tool for the job. The problem is some sys admins see it as the answer any question, when a bash script would have been just as good. But if you're crunching massive logs or even need to think about a regex, PERL can't be beat.
That said, In my line of work, the tools you have are what's on the system. No CPAN, no EPEL... nothing. PERL in a base install is typically far more useable for most tasks, without including anything at all. Python is usually anaemic, ruby is no where to be seen, and no gcc to be found. So PERL is usually the only option for complex tasks.
PL/SQL is the worst real language (which is to say, a language I would consider actually implementing something in if everything lined up right). It's deeply married to Oracle. It only runs on Oracle databases, which in addition to the obvious lock-in potential also means you have to keep your PL/SQL up to date on a per-database level and you have to share resources with your other applications and scripts. The language itself is based on Ada, which lacks many modern features that even languages such as Java have. The only positive thing I can say about it is that it's easy to break into writing SQL at any time, though unfortunately the performance of this is miserable because it effectively calls the SQL engine like any other app would (it does admittedly have the advantage of not having to make a network call if your database is hosted separately, but it doesn't really buy you as much as you might think in most situations). Even crazier, if you can potentially get multiple rows back, it will by default fetch 1 row at a time (though it kinda makes sense due to the shared resources thing, since memory would be pretty limited on one box running many PL/SQL scripts and queries), which leads to a massive context switching overhead if you don't know exactly what you're doing.
use a vice emulator and simon's basic to draw neat litttle circles ... its not even a programming language its scripting, no?
how about using what feels right instead of wasting time hacking on shit you can't hack
Free speech was meant to be free for all... how can anyone grow up in a nanny state ?
The funny thing about language fanboys is that they always act like every single post about their beloved (usually terrible) language is 100% serious.
I'm offended that Lisp wasn't even on the survey.
Apocalypse Cancelled, Sorry, No Ticket Refunds
I'm in the minority, I like PERL.
Only by those who use it.
I still use perl quite a bit, as have my co-workers past and present. So... I see perl written by other people all the time.
#DeleteChrome
Reminds me of Unix. There's even a unix haters manual out there. Yet it's clearly the best OS out there. So the same logic goes here. Perl is very powerful. Probably just about everyone out there has used it, just like Unix. Everyone thinks there is something better out there, though they keep using Perl to get stuff done. For data processing, it's really hard to beat.
A poor craftsman won't accept that it could be his skills.
Seems there's a lot of tool blaming going on here.
Why UNIX?
No, when a good craftsman buys a new tool and it is better than the old one, he says, "gosh, this new tool is better than the old one." He doesn't go all macho-moron and insist, "meh, tools are all the same, no difference."
Actually, the master craftsman is almost certainly a master in tools, and probably has tool preferences.
Unfortunately a lot of the modern tools are cheap imports. Vintage tools have longevity and have stood the test of time. Reaching for a cheaply constructed piece of plastic crap will probably break and leave you blind.
Why UNIX?
It's all good once you get your drum card set up properly, then just punch away!
Apocalypse Cancelled, Sorry, No Ticket Refunds
use(English);
not that hard.
Apocalypse Cancelled, Sorry, No Ticket Refunds
Have you looked at the stackoverflow questions on perl? Most don't even dignify a response.
But I've found the community to actually be very nice. I've been in the #perl6 IRC channel a ton lately, and the people are all extremely nice. Asking Perl 6 question on stackoverflow always gets nice responses.
If went to a C# forum and just asked someone to code something for me (with a list of specs), the response would be just as dismissive.
A cat can't teach a dog to bark.
It is so much more than that. The type system is extremely powerful and useful for implicit error checking. For example, I just defined a "Team" type to be a nonempty list of integers where each integer is a valid team member. So any time the application gets array data from the network that's supposed to describe a team, it's automatically error checked without needing to be deserialized to a custom class (or god forbid, calling "assert(is-team(team))" each time). I wrote the rule that the array must conform to, so creating/changing it in a way that it no longer follows the rule is an error.
The same power goes into parameter parsing for function overloading. You're not limited to overloading based on classes and number of arguments. You can overload based on the characteristics/values of the arguments, so a recursive base case could be called based on a trait of the argument. It should cut down on errors, because you know you'll never forget the check that calls the base case since it's automatic once defined as a function overload.
Perl 6 is a very big language, and I haven't mentioned things like its parsing library, which might be its killer feature if you need to write parsers.
A cat can't teach a dog to bark.
There have always been two kinds of perl. There's perl that you've written, and there's perl that someone else has written.
Perl that you've written is probably the greatest programming language to have ever lived. It looks like you, it feels like you, it smells like you. It's super-easy to follow because it follows your brain perfectly. That's its power -- it shapes itself to your way of thinking. The syntax changes shape, the logic changes shape, it becomes a perfect fit.
Perl that someone else has written is likely the absolute worst programming language that will ever exist. Not only is it as cryptic as that someone-else's brain, but reading it dedicates at least 50% of your brain to nothing but the words: "why'd he write it this way, I'd have written it the other way" for every line of code, every time, always.
The article shows a very simple block of perl code, and, as discussed, each and every single line is not the way that I'd write it. I've been programming in perl for 20 years. It's been my livelihood for 18 years. It's ultimately paid for everything I own.
It's very rare that I get to deal with other people's perl code. Not that other people's php code is fun to deal with either, and certainly other people's C++ code can be equally brutal, but at least in those cases, I have my full brain to help me read their code. Alas, as discussed, when I'm reading other people's perl code, I only get half of my brain, while the other half just sits there complaining.
Perl's awesome, when it's your own. Maybe it's like an attack-dog that way. Yours is an asset, someone else's is a threat.
I know I'm late to the party here, but I used perl extensively for maybe a year. It was the best choice for one particular task I had to do and that's also how I learned it.
I could have written the same tool in C but that would have been kind of silly and I could have written a horrible shell script but that would have been horrible.
I was parsing a lot of strings as best as I can recall and perl seemed to be good at that Use the right tool for the job.
--
To be honest and fair I had written things like that in C before. I really wanted to write this tool in Perl because I had never used it before and I wanted to learn it. Perl was well suited for that particular task though. OTOH, since then I've forgotten most of the Perl I learned but I still know C.
And don't forget the lack of sane scoping, which you'll hate if you come from a Scheme/Lisp background instead.
Ezekiel 23:20
I don't get this in python. Recently, when a website changed its API slightly, I went back to some three year old python I wrote, and it was instantly obvious what was going on and I was able to modify it, test it, and check the code back into git in under a half hour.
Yes, I do get this with C++, which like perl is not designed to be read.
That's also true if you come from a Smalltalk background. The only globals in Smalltalk are the class names in the class table. Object state is all private, and both methods and closures have their own scopes for locals. I'd forgotten how bad it was in JavaScript until you reminded me.
I am TheRaven on Soylent News