Live data from Hacker News

Perl 7 is going to be Perl 5.32, mostly

perl.com

171–180 of 573 posts

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

#171
> > use utf8;

> there’s still much to be done to make Unicode the default

Why's that? If that's something someone with zero Perl experience can easily understand. Isn't this only about the source code? Or does this mean all strings are unicode?

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

#172
post #161
post #117

Earlier quoted context omitted.

use strict. In Perl you can prevent something like the following from compiling. You can't with Ruby (unless they've finally addressed that). $foo = 2; if (some_test()) { $fooo = 3; }

Shouldn't that be: my $foo = 2; ?

I was leaving the declaration implicit.

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

#173

Earlier quoted context omitted.

Perl definitely has a lot of non-patterned arcana. For instance, $| This variable, if nonzero, will flush the output buffer after every write() or print() function. Normally, it is set to 0. In other languages, you do something like os.stdout.buffered(true) or sys.stdout = io::buffer(sys.stdout) or something like that where you're combining composable pieces: the standard std variable, a standard way of opening files…

Sure, it's got lots of historical baggage, but there are more sensible alternatives to $| - like STDOUT->autoflush(1) - it's not like you have to use the obscure versions of every feature.

That certainly doesn't solve the problem of other people showboating their knowledge of obscure Perl sigils by using those ridiculous line-noise abbreviations in code you're trying to use and understand, so you have to look up each bit of obscure punctuation in its particular context in order to understand the code.

If hard-to-read-and-remember syntax exists, people WILL use it. And some people will make a POINT to use it, because it makes them feel cool.

Having two totally but pointlessly different syntaxes for the same thing doesn't absolve you from having to learn both syntaxes, because you'll still encounter other people's code that uses both of them -- it just gives you twice as much syntax to learn.

If there's a "sensible alternative", then why does there have to be a "senseless alternative" in the first place?

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

#174

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.

Nearly everything at Fastmail is in Perl. Cyrus, which is the mail storage engine, is in C (and open-source), but everything else is Perl.

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

#175
post #164

I have used Perl since the Perl 4 days. One can write bad Perl, and I've written a lot. One can write good Perl, and I've written some. It has saved me and others quite a lot of time on assorted projects. These days I tend to use Python where once I'd have used Perl. This is mostly because I find that the young are far more likely to know Python than to know Perl. I will be retiring one of these days, after all.

I'm not anywhere retiring yet, but when Python came around the corner, I thought, well it's as well-suited as Perl for larger things (i.e. not one-liners for text processing - those are a reason for keeping Perl around) but with a cleaner structure.

And that was at a time where you still (occasionally) had to write your own string replacement function that a weirdo company-specific BASIC dialect didn't have.

There's never been a language that I thought of as "Python, but with a cleaner structure", even though Go may be something like "Java 1.2 but with a cleaner structure and a fast toolchain"

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

#176

I was part of a team that wrote significant parts of Amazon's payment processing systems in Perl in the late 90s. I really loved the language. It's object system was so flexible and powerful. Once you understood how write idiomatic perl. It was a joy to use. I'm looking forward to trying out Perl 7.

United States District Court filing system for court cases is written in perl. Horrible language filled with one liners that only makes sense in the mind of the now retired and gone programmers. Sadly, I do not know why we cannot pursue other technologies. Perl is a trap... buyers will be stuck for 30 years. Like a mortgage, but without equity or returns.

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

#177
post #92
post #82

Earlier quoted context omitted.

Perl was a great fun scripting language back in the day of CGI and "webmaster@". It died a noble, honorable death. RIP.

It's not even close to dead.

While you can FIND Perl jobs, it is effectively dead for most of the hiring market. It will never truly disappear. COBOL is not dead either. Is it really something that we think of when we talk about modern software engineering? Not really.

How much production software is started from scratch every day using the language?

I started my career in Perl and I still have fond memories of working with it up to late 2000's, but by that time the writing was solidly on the wall.

Dead in this context means "niche".

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

#178

Earlier quoted context omitted.

Yeah that too! People keep saying perl is a bad language or something and the other languages can't even get implementing closures right. I've always liked the references syntax, probably the most complained about feature. Its just pointer thinking. You could probably collapse `$array[$x]->{"foo"}->[0]` to `$array[$x]{"foo"}[0]` and save some keystrokes.

> probably collapse $array[$x]->{foo}->[0] to $array[$x]{foo}[0] ... Yup, one's been able to collapse exactly like that for more than twenty years. https://metacpan.org/source/LWALL/perl5.002b3/pod/perlref.po... That's from 5.002, from last century, and it wasn't introduced on 5.002. Beginning from v5.20, one's also been able to use the postfix dereference syntax, turning: say join "\t", @{ $foo->{bar}[0]{quux} } int…

You're right! I always preferred the explicit arrow because it reminded me of C. Dammit now I want to write perl. I miss autovivification so much. Most people hate the pointer syntax and call it unreadable. I think there should be a perl tricks page that lists all these tricks.

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

#179
post #39
post #25

tl;dr - Perl 7.0 is going to be v5.32 but with different, saner, more modern defaults. Perl was great 20 years ago for basic scripts. Where is it still used today who hasn't transitioned to Python/etc?

Perl continues to be great for basic scripts. Why change and throw away 20 years of experience? The only thing I've noticed that's lacking is decent protobuf support.

Some people would consider that a good thing.

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

#180

Earlier quoted context omitted.

Sure, it's got lots of historical baggage, but there are more sensible alternatives to $| - like STDOUT->autoflush(1) - it's not like you have to use the obscure versions of every feature.

That certainly doesn't solve the problem of other people showboating their knowledge of obscure Perl sigils by using those ridiculous line-noise abbreviations in code you're trying to use and understand, so you have to look up each bit of obscure punctuation in its particular context in order to understand the code. If hard-to-read-and-remember syntax exists, people WILL use it. And some people will make a POINT to u…

Because perl improved over time, but they didn't want to break people's existing code needlessly.

No-one ever deliberately invents 'senseless' things, we just discover better ways over time. Sure, if we could somehow magically always invent the best way first of all, that would be great. But we can't, so we make the best of what we have, and improve when we can. But there's no need to punish the existing users of older, 'worse' things.

Post reply on HN