Live data from Hacker News

Perl 7 is going to be Perl 5.32, mostly

perl.com

101–110 of 573 posts

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

#101
post #48

Earlier quoted context omitted.

huh. I spent a couple years writing perl professionally, I guess that was around 2006, and I couldn't agree less. Its object system is so bizarre compared to any other language - it's like it doesn't really have an object system, it has parts of a system that you can try to assemble, but no matter what you do you end up with something weird. And on top of that, the sigils, refs, and `wantarray` systems means that fig…

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…

I'm no fan of Perl, but you can use $OUTPUT_AUTOFLUSH instead if you "use English;". So this isn't really a Perl language thing; it's a style thing. Other languages can be made to look really bad with poor style. The question then becomes what is culturally accepted, and what is not.

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

#102

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.

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've heard Python's object system isn't that different under the hood.

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

#103
post #48

Earlier quoted context omitted.

huh. I spent a couple years writing perl professionally, I guess that was around 2006, and I couldn't agree less. Its object system is so bizarre compared to any other language - it's like it doesn't really have an object system, it has parts of a system that you can try to assemble, but no matter what you do you end up with something weird. And on top of that, the sigils, refs, and `wantarray` systems means that fig…

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…

One can also:

    use IO::Handle;
    STDOUT->autoflush(1);
    STDERR->autoflush(1);

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

#104
post #48

Earlier quoted context omitted.

huh. I spent a couple years writing perl professionally, I guess that was around 2006, and I couldn't agree less. Its object system is so bizarre compared to any other language - it's like it doesn't really have an object system, it has parts of a system that you can try to assemble, but no matter what you do you end up with something weird. And on top of that, the sigils, refs, and `wantarray` systems means that fig…

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.

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

#105
post #68

Earlier quoted context omitted.

This seems to be a common experience - people say it felt powerful and modern in the 90s, because it was . For those who started programming in the 00s and 10s it looks clunky and weird compared to the other options.

That doesn't add up because today's most popular languages - JS, Java, Python, PHP and Ruby - were also released in the 90s.

PHP was a reimplementation of Perl by someone who didn't understand why Perl did things the way they did and so ended up creating a vastly inferior language. Other than maintaining some legacy projects, I've not touched PHP in over a decade and I'm glad to avoid it. Perl is a tool I still return to for some tasks (one was a bizarre management request for a spreadsheet of all the Java classes in a large project which took fifteen minutes to create a Perl script to generate and ten of that fifteen minutes was looking at documentation for Perl modules I hadn't used in a long time).

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

#106
post #68

Earlier quoted context omitted.

That doesn't add up because today's most popular languages - JS, Java, Python, PHP and Ruby - were also released in the 90s.

Perl was released in 1987. The languages released in the 90s all stole Perl/Awk's good idea (have an associative array/hash map/dict type as a builtin data type) but had much nicer syntax.

Perl5 was released in October 1994. That's the version which competes with Python, Ruby and PHP because it introduced OOP.

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

#107
post #20

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.

IIRC Craigslist was written in Perl but that's the only high traffic site that comes to mind.

The Amazon retail site is written in perl (at least the presentation layer still is, you can find mason references still in the HTML source if you go looking, don't know how much else behind it is in perl).

https://metacpan.org/pod/Mason (if you're not familiar with Mason)

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

#108
post #68

Earlier quoted context omitted.

That doesn't add up because today's most popular languages - JS, Java, Python, PHP and Ruby - were also released in the 90s.

Perl was released in 1987. The languages released in the 90s all stole Perl/Awk's good idea (have an associative array/hash map/dict type as a builtin data type) but had much nicer syntax.

I stuck with Perl even when Ruby came along and offered to be the next best thing because Ruby didn't have a use strict equivalent. Having to declare variables before use is a good thing.
Post reply on HN