Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Python killed Perl.

By the time Perl 6 was around, Perl's lunch was already eaten by Python. Only a few table scraps left. Perl 6 would have had to be a better Perl 5 and a better Python 2 to win.

Python came with better batteries and better syntax. It allowed producing code you could read and understand a week later. Perl I found was a write-only language for me. I went back looking at my old Perl code and I couldn't decipher it without some effort.

And Python became popular not just because it was a better Perl, but it attracted folks who used Java and C++. CPU speeds were getting fast enough that you could actually do file and network IO at acceptable speeds without all the `public static void main(String[] args)` and `System.out.println(...)` boilerplate, but still had all the object oriented bits like inheritance and composition with which you could go crazy with if you wanted.



Personal anecdote in support: my first job out of college was at a data-analysis company, where my task was usually to write one-off scripts to extract data from various data sources and massage it into the format the analysts wanted for their spreadsheets. I wrote most of those scripts in Perl at first, with the odd Bash script here and there. Then one of my coworkers said "Hey, if you like Perl, you'll love Python". I learned Python (2.1 was the most recent version at the time, which tells you how old this story is) and almost immediately switched over. All my new one-off data-extraction scripts from then on were written in Python (though still with the odd Bash script here and there).


When I was doing undergrad CS in 2006, we had a choice between Perl and Python for our scripting assignments. As far as I know, no one chose Perl. It's comparatively a huge pain to get ramped up on, and the promised payoff is that you get all these implicitly stateful sigils that let you write contest-winning one-liners. But by the early 2000's, the culture was getting up to speed on obvious-in-retrospect principles like "avoid global variables" and "you should give your variables names that someone else can understand", and even as students we could all see that Perl wasn't going to be the future.


I chose Perl first. At that time around early 2000s it was the more popular. I liked how my scripts were short and compact but then I I had noticed that I couldn't understand what I did week or so later. The "write-only language" joke was kind of true for me. Then remember finding Python and rewriting all my script in Python and have been using it ever since.


> Perl 6 would have had to be a better Perl 5 and a better Python 2 to win.

Don't sell perl 6 short. I am using perl 6 for significant projects now (after a career of perl 5) - and it's fundamentally different. I describe it as perl to the power of perl.

For me, expressiveness is fundamental. And perl 6 gives me that.

Perl 6 is simply suffering from python being everywhere. And perl 5 was always easy to lampoon as "line noise". It's a stupid quip, but it leaves a mark on new programmers. You don't even need to read the course and you can already have an opinion. Stupid kills? And then perl 6 doubled down on that anyway. Then I doubled down on that ALSO and I get to use (carefully chosen) unicode symbols in my line noise :-) So there.


> For me, expressiveness is fundamental. And perl 6 gives me that.

I saw Larry Wall at one of the conferences. He talked a about Perl 6 how it was progressing and such (it was before it was renamed) and year, expressiveness what stuck out. It certainly has lots of nice features, too. But at least for me, I realized with Perl 5 I wasn't smart enough for it. I would be lured by the clever short expressions and then sometimes later look back and had no idea what I wrote.

Larry is a great person, btw. During lunch at the conference sat at his table and he was very approachable and warm. I don't remember what we talked about exactly just that it I liked how down to earth and nice he was.


> But at least for me, I realized with Perl 5 I wasn't smart enough for it.

I feel like you but I love it: I am not limited by the language. Not by perl 5 and not by perl 6: When I am willing, I can dig deeper and find more to work with. When I am willing I can try and follow presentations or books by Damian Conway, Mark Jason Dominus, etc and I can get new ideas and inspiration. I can always learn more about this fundamental tool that's at the center of what I build. The tool challenges me in a good way. It does not slow me down. It does not limit me. If anything in there is going to limit me, it's going to be my own brain.

And perl does that without tripping me. Because in perl, the intuitive way is one that's not likely to hurt you. While if you know better, you can work with the more elaborate, deeper features.

I hate it when I have to use a language that constantly limits me. It has happened. I am not always free to choose the programming language or platform. For some, it's so frustrating that I charge more. And it's still frustrating.


Since you're actively using it - how's performance in Perl 6? Are the rumors that it's slower true or exaggerated?


I have exactly zero functions that are written in both. So comparison is just intuitive:

My current projects make extensive use of numerical functions AND of regexes and grammars. Both used extensively. I am very satisfied with the performance on both aspects. It does the job. And there is no question that for the regexes and grammars, what I have goes FAR beyond what I ever dared to run in perl 5. Performance is good, including on this stuff that I feel would have been pushing perl 5.

Still, I write for expressiveness. It matters to me how fast I can write. And I am NOT satisfied with "searching through the doc". That's the main sore point for me. The doc is very good but online-first and local... eventually. So I am stuck using an online search function... which constantly falls short.


I would bet against this hypothesis.

Perl exploded because it was the easiest, richest ecosystem available to plug into CGI and the web.

PHP & Ruby & Python then collectively covered the same waterfront whether you wanted “easy” or “fun” or “simple”.

And I would propose that PHP attracting the developer cohort who wanted “easy” and Ruby/Rails attracting the developer cohort who wanted “fun” were each individually more damaging to the Perl ecosystem than Python.


Agreed. In grad school, I used Perl to script running my benchmarks, post-process my data and generate pretty graphs for papers. It was all Perl 5 and gnuplot. Once I saw someone do the same thing with Python and matplotlib, I never looked back. I later actually started using Python professionally, as I believe lots of other people had similar epiphanies. And not just from Perl, but from different languages and domains.

I think the article's author is implicitly not considering that people who were around when Perl was popular, who were perfectly capable of "understanding" it, actively decided against it.


PHP also contributed. Perl CGIs were a very popular way to build early web apps.


PHP contributed hugely for me. I was writing a lot of Perl for web apps from about 1996 to 1999, when PHP really took hold and was an improvement in almost every way, right down to including PCRE regex functions. Perl felt clumsy compared to PHP, especially for MySQL and other relational DB stuff. PHP was built for the web.


> By the time Perl 6 was around...

Just my opinion, but this says more about perl 6's insane development schedule than python's advantages.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: