Live data from Hacker News

Why Perl Didn't Win

outspeaking.com

111–120 of 187 posts

Re: Why Perl Didn't Win

#111
post #16

Earlier quoted context omitted.

> Is that -really- worth forcing unicode handling? I dunno. I'm new to Python (version 2 so far) and I easily spend 25-50% of my coding time fighting with ascii/unicode issues in Python. I wish Python 2.x just did something smarter. Similar, but not quite as bad, is the need for me to put str() around non-string values in concatenation. Just f'ing doing it for me. I'll write a bunch of code, put together a message in…

To avoid str() calls with concatenation, use % formatting: '%s %s' % ('hello', 'world') Avoiding these implicit behaviors helps avoid bugs; it's worth it. I'd recommend going for Python 3 unless there's a specific reason (library) keeping you on 2.

I'd recommend:

    '{} {}'.format('hello', 'world')
But yes - either way - it solves the need to do str() when concatenating.

Re: Why Perl Didn't Win

#112
post #7

Anyone feeling that Python 3 is gonna do the same to Python as Perl 6 did to Perl?

No, it doesn't seem like the same issue at all. I used to use Python for most (production) things, between 2003 and 2008. Due to work, I more or less switched over to PHP and Java, and hadn't written any new Python in anger in years until a month ago. Despite all that, doing some simple stuff in Python 3 felt exactly like Python 2 always had. I'm sure that people who use it on the daily will notice and stumble against lots of differences, and porting large codebases is hardly ever fun, but it's fundamentally the same language.

Re: Why Perl Didn't Win

#113
post #85

When I was younger I pushed myself to know Perl 5. I tried to learn Perl with one book. It was surprinsingly hard. I took a simpler book. I also failed grasping Perl. Those were the two recommended books for learning. I've come to realize years after that Perl is simply difficult to learn, lots of little things to memorize. Its community took pride in language arcana. Things that are now simple in other languages are…

You're incorrect in your realization. The truth is that the older books for learning perl are simply shitty. If you read Ovid's Beginning Perl, or chromatic's Modern Perl, you'll find they managed to explain the concepts very easily.

No, he's right. Perl is shitty. Have you ever read a random Perl script? It's impossible to interpret.

Re: Why Perl Didn't Win

#114
The "Maintenance and greenfield concerns are very different" section is relevant to my interests:

> The implications for a programming language are difficult to prove conclusively, but simple to explain: an ecosystem focused more on maintaining existing projects than creating new projects will be less attractive for new projects.

Ruby/Rails provides an interesting example here. The ruby and rails community ecosystem (the author is right it's about "ecosystem" more than the language) -- has, in general, done it's best to focus as much as possible on innovation over stability. That is, has tried to choose focus on creating new projects over support for existing projects.

Much to the frustration of some in the ruby ecosystem with existing projects to support.

(Rails, of course, from one perspective is an existing project; from another is a framework, which has generally over it's history cared more about new projects that will be created with Rails than existing projects built on Rails that need to be supported).

Of course, there still are existing projects, and there are still developers participating in the ecosystem who need to support those existing projects. So you can only go so far.

What has this done for ruby/rails ecosystem? Hard to say. Overall it's been successful, but it still can't make the ecosystem as greenfield as a true greenfield ecosystem, which is perhaps why some are leaving ruby/rails for greener pastures -- more than any qualities of ruby as a language, it's just the opportunity to be in a greenfield ecosystem that is attractive, perhaps.

Re: Why Perl Didn't Win

#115
post #36
post #33

Earlier quoted context omitted.

Big rewrites = death

It seems so. * Perl 6: almost everyone is on Perl 5, or switched to another language * Python 3: many libraries and devs will stick with Python 2, several devs switched to Go * PHP 6: unicode rewrite never released, new features backported to 5.3+, several books were published in advance with PHP 6 in the title, next release will be named PHP 7 to avoid confusion * Lua 5.2+: half of the community stuck with 5.1 as su…

How does the generally successful ruby 1.8 to 1.9 transition fit in?

I think maybe is the answer it managed to barely do just as much backwards incompat as it could get away with. (Barely, it drove a lot of people crazy). But it was quite possible to write code that worked in both ruby 1.8 and 1.9, quite intentionally, despite the backwards incompatibilities.

Combined with a commitment from key players (esp Rails) to move to 1.9 and stop supporting 1.8, forcing the issue. And that it happened at a point when ruby/rails were at the peak of their popularity, not already on the downslide (Perl). Which of course effected how much backward incompat you can get away with.

That's the trick, predicting how much backwards incompat you can get away with, of course.

But of course, there's another lesson here too, which the OP astutely calls out in the "greenfield" section -- if you focus too much on stability and supporting existing projects, that's just another way to make the ecosystem go stale.

Re: Why Perl Didn't Win

#116

Earlier quoted context omitted.

Everybody IN ENTERPRISE is still using Python 2. Realistically, most of the Python ecosystem is compatible 2+3, we are seeing new libraries and programs compatible 3.3+-only, and there's no broad reason to use Python 2 anymore, with minor exceptions.

> and there's no broad reason to use Python 2 anymore, with minor exceptions. If you count big chunks of legacy python 2 code a "minor exception", I agree. Anyway, the big difference between python 2 -> 3 transition and the Perl 5 and Perl 6 coexistence is that nobody within the Perl community tried to end-of-live Perl 5. Yes, that means less incentives for migrating to Perl 6, but it also reduces the risk for Perl 5…

I don't think anyone advocated for converting large legacy codebases 2->3. But 3 should be the "default" for new projects, and only use 2 if they have a reason.

Re: Why Perl Didn't Win

#117
post #20

You know what rocked? Perl 4. I started on Perl 4 in the mid-1990s. It was fantastic! I started replacing thousand-line C programs with hundred-line Perl programs that were more robust and worked better, and replacing shell scripts made of awkward sed/awk pipelines with neat, tight Perl. Arrays and hashes as first class data structures? Marvelous! Then Perl 5 ruined it all. The ridiculous, bloated "object oriented" s…

MooseX::Declare makes Perl OO actually pretty good. I like the traits system. Not that I'd pick it as a first starting point for new work, it's nice for using with existing legacy work.

Re: Why Perl Didn't Win

#118

Earlier quoted context omitted.

The perl developers greatly underestimated the importance of syntactic sugar and familiarity. (Java was helped a lot by looking like C). PHP was much more friendly towards new programmers than Perl 5, it was so much easier to make simple web pages. So it took over. It didn't matter that Perl 5 was more advanced. (oh, you uploaded module to same dir and didn't remember to add something to @INC)

> The perl developers greatly underestimated the importance of syntactic sugar and familiarity. I don't think that's the case. The problem is that the generation of tools that have stuff in common with perl (awk, sed, shell) are completely unfamiliar to programmers which started programming in the last 15 years, compared to those that started 30 years ago.

You know, that's actually really insightful. I never bothered to learn awk, sed and shell because Perl did it all under one roof. I can only imagine moving from that mess to Perl must have seemed like a revelation to those that came before me, while Perl 5 to Perl 6 is less obvious.

Re: Why Perl Didn't Win

#119
post #89

I think it is cool to think of one's self as the hero in the story of their life. You battle adversaries, have little victories, complete long story arcs, find a sweetheart and have romance. I feel Perl does not deserve to be mentioned in a hero's tale. There's been too much rankling and nincompoopery out of perl's characters given the size of that community. Far, FAR too much griping. Perl is a bummer, and that is w…

This is pretty good advice to live by. I should keep this in mind for myself.

You're both joking right? I find myself wanting to google this guy in 5 years so I can see how much real life kicks his poetic ass.

Re: Why Perl Didn't Win

#120

Earlier quoted context omitted.

I'm very glad that only game writers are using Tcl for scripting their games. It's a godawful language I'd never want to maintain any real software in. Python and Ruby are bad, but Tcl is a degenerate joke. Let's please leave it undiscovered.

That said, the saving grace for Tcl were things like Expect and Tk. I don't think I ever used it for anything else....

It's being used for AI, ML and data science.
Post reply on HN