Live data from Hacker News

Perl 7 is going to be Perl 5.32, mostly

perl.com

341–350 of 573 posts

Re: Perl 7 is going to be Perl 5.32, mostly

#341

They last line of the article summarizes it well: > Perl 7 is v5.32 with different settings. Your code should work if it’s not a mess. Expect a user release within a year. Are there actually people that are still deploying new things in Perl? The only times I see it is for legacy stuff, and then only because the script is too much of a hassle to be rewritten.

I used to work for a company that used Perl as their primary language. The codebase was millions of lines long, modules (pm files) with like 1000 methods and 10,000 lines, a total mess and it had 0 unit tests too. Almost beyond salvageable. Left a bit of a sour taste. They're trying to migrate to AWS but AWS don't even natively support Perl in their libraries. There's a few third party libraries in CPAN but nothing a…

Keep in mind TDD wasn't really invented yet, so it's understandable.

Also, CPAN had better libraries than pip did all the way up until I last used Perl in 2015. Ofc, it depends on what you're doing. My point is, there was a reason to use Perl once upon a time ago.

The alternatives back then were PHP, C, C++ (the old bad kind), BASIC, assembly, FORTRAN, and others like Smalltalk. Seeing this, it's understandable why Java took the world by storm the same way Perl did.

Re: Perl 7 is going to be Perl 5.32, mostly

#342

Earlier quoted context omitted.

Ok, so I wrote tons of Perl and am to this day a fan, but I don’t think one can call a blessed hash (or scalar for the fancy folks) an object _system_. It is flexible and fun and I do miss it. True story: years of passing functions to other functions and map/greps made the switch to FP Scala (another language I fear will die) a lot easier!

> I don’t think one can call a blessed hash (or scalar for the fancy folks) an object _system_. Perl first, then JavaScript. Did you know JavaScript classes are blessed hashes? They even take about the same amount of syntax. ("__proto__" vs "blessed", "prototype" vs "bless"). Old JavaScript made the blessing crude and obvious. Modern JavaScript lets you hide it in a "class" decleration. Which you can also do in Perl…

Perl and JavaScript both give you a minimally specified set of tools you can use to build your own more advanced object system.

IMO, that's why both languages have been able to be extended and adapt so much.

If you look at tools like Moo and Moose in Perl and the different coding paradigms that evolved in JS before the "class" keyword was standardized, this is pretty clearly evident.

JS has had the advantage of a standards committee pushing new language features aggressively. Perl has moved more slowly, keeping a majority of functionality in libraries.

Re: Perl 7 is going to be Perl 5.32, mostly

#343
post #257

Earlier quoted context omitted.

Whatever happened to the neophyte raising him/herself up to level of the master? Programming seems to be the only profession in which the beginner is excused learning the language thoroughly and, worse, that he/she expects the language to be dumbed down to make it easier to learn. Can you imagine a budding musician complaining that musical notation should be made "easier for beginners"? If you want to grok Perl learn…

> Can you imagine a budding musician complaining that musical notation should be made "easier for beginners"? You mean like string instrument tab coloured by finger instead of sheet music? Yes, exactly like that.

But you would still have to master notation if you were to become an accomplished jazz musician, for example.

Re: Perl 7 is going to be Perl 5.32, mostly

#344
post #338

I've been a perl zealot since 2005. I didn't even know "python" existed until around 2008 when I found a script file with a ".py" file ending in a fresh ubuntu install. I started going to perl conferences sometime after 2010 when someone on irc informed be about them. I learned so much in those conferences, mainly about the alternatives to cgi and the modern OOP "framework" named "moose". I thought I was in heaven. I…

Python? That doesn't make sense. Anyone who appreciates Perl would surely choose Ruby over Python.

Ruby is just as dead. Only thing it had going for it was Rails.

Re: Perl 7 is going to be Perl 5.32, mostly

#345

They last line of the article summarizes it well: > Perl 7 is v5.32 with different settings. Your code should work if it’s not a mess. Expect a user release within a year. Are there actually people that are still deploying new things in Perl? The only times I see it is for legacy stuff, and then only because the script is too much of a hassle to be rewritten.

My full-time job is working a codebase where the back-end is entirely written in perl. Codebase was started around 2014. This was probably a bad decision, the founder was a perl guy.

Perl is not bad but no new codebases should ever be written in it imo. It's to easy to shoot yourself in the foot unless you know perl REALLY well. Moose is ok but a far-cry from any modern OOP system.

Re: Perl 7 is going to be Perl 5.32, mostly

#346

Earlier quoted context omitted.

The concept of giving functions names spelled out with letters that form words that describe their meaning was invented a long time before Perl figured out that doing that was better than overloading a limited set of ASCII punctuation with random abstract unrelated concepts.

You are going to end up perpetually unhappy if you always assume that people designed things the way they did just because of stupidity / incompetence. Perhaps instead you should take a while to think about the reasons why they might have chosen their design. Even if you can't immediately think of a good reason, doesn't mean there wasn't one. For this particular case, I'm not sure what drove the selection, but I woul…

Yes, that is how Perl evolved. It's called "whipupitude" in The Land of Perl. Larry's initial goal was to create a better sed/awk for Unix.

Re: Perl 7 is going to be Perl 5.32, mostly

#347

Perl has these tiny neat features that I still miss in other languages. Like unless (opposite of if), and postfix syntax. print "It worked!\n" unless $error; print "Item: $_\n" foreach @items;

I hate unless! It always makes me stop and think a few times, causing double or even triple negatives in my brain. What's wrong with something like "print this if not $error"? Maybe that's because I'm not a native English speaker?

Well, print this if not $error doesn't work in most modern languages either. It's

    if not error:
        print this

Re: Perl 7 is going to be Perl 5.32, mostly

#349
post #205

Earlier quoted context omitted.

$| is related to pipes. Much of the sigils are like this.

It suddenly makes sense and isn't so bad. The $ is a sigil, so it appears before variables like $var, so it's just saying | it out. When typed at the beginning of a one liner it becomes quite obvious what you want. This is clearly not a feature for a large project, but a quick UNIX style one off awk-like script.

In Perl `$` is strictly a scalar variable though this can be a reference to an array, hash or object as they are stored as references. Not to be confused with `$` in PHP which simply denotes a variable of any kind. In Bash `$` denotes the value of a variable.

Re: Perl 7 is going to be Perl 5.32, mostly

#350

Perl has these tiny neat features that I still miss in other languages. Like unless (opposite of if), and postfix syntax. print "It worked!\n" unless $error; print "Item: $_\n" foreach @items;

I miss those too and I'm constantly annoyed Python doesn't have more one liner support.
Post reply on HN