Live data from Hacker News

Perl 7 is going to be Perl 5.32, mostly

perl.com

391–400 of 573 posts

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

#392
post #257

Earlier quoted context omitted.

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…

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…

Perl is an old accordion.

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

#393

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.

I hear Perl has weak typing with implicit type conversion. The only other language I know that has a powerful implicit type conversion system is C++. How does implicit type conversion work in Perl?

Generally in Modern Perl-style programming, strict and warnings are enabled, so implicit type conversion is not used as much these days. Warnings or errors are emitted.

I've found this greatly increases reliability.

An example is that I enabled those on the W3C checkers and a serious latent bug was discovered and fixed, even on code I wasn't familiar with.

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

#394

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…

> it is not the notorious "write only" language that many troll it to be I dispute that. I have worked with many languages, and Perl has always been one of the hardest to remember due to non-standard symbol abuse and a few strange semantics. There is a reason it has that reputation. Even writing it isn’t easy. I can describe the Python syntax after years of not using it. Perl? No way I remember it.

> I have worked with many languages, and Perl has always been one of the hardest to remember due to non-standard symbol abuse and a few strange semantics.

For example?

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

#395
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.

imdb.com is perl.

Most of the ad network backend sites are perl, including a lot of Yahoo.

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

#396

The proposed defaults are a good idea, and I hope some or most of 5.32 long standing experimental features become core features (or just go away entirely). But I'm afraid that the badly needed core C code refactoring and restructuring is being left out, and that will make it very hard to introduce new features into the language. I also had this secret hope that Perl 7 would be a tidier, simplified Perl 5 with little…

> I also had this secret hope that Perl 7 would be a tidier, simplified Perl 5 with little or no relation to Perl 6.

That's what the article says.

> could perform better

Perl's performance is not an issue.

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

#397
Maybe someone here is the right person interested in this: I've been working on making Perl more suitable for functional programming[1]. This project still needs a lot of manpower to become something good. I need people to work with me on this, I won't continue alone. Please give me feedback about where I should be going with it, or tell me if you're interested in joining the effort.

[1] https://metacpan.org/pod/FunctionalPerl

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

#398

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;

Until some joker writes an unless/else block. Gah. I hope someone implements an elsunless keyword /s

I've never been a fan of unless blocks (as opposed to the unless postfix, which is a bit easier to swallow). The lower precedence spelled out boolean operators (not/and/or) mean you can just use if not instead, which is just as readable in most cases and isn't confusing in the else case.

e.g.

    unless ( $foo ) { }
    if ( not $foo ) { }

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

#399

Earlier quoted context omitted.

I loved Perl back in at the turn of the millennia. My first data science equivalent projects were in Perl. To this day I can not find anything quicker to prototype in. Python is slow in comparison. Perl is great for quickly hacking something together for R&D purposes. Also, if you need to write something custom, Perl runs so much faster than Python and R. I, like many people, stopped using Perl beyond a quick script…

Do you mean faster to write, or faster to run, or the combination of both?

Both I would guess.

Perl in serial is already faster to run than Python, and as soon as you start using threads Perl blows Python straight out of the water. The only reason that stuff like tensorflow or numpy is not as dog slow as the rest of python is that they are bindings to c(++) or fortran libs.

Writing faster is debateable, but Perl has tons of niceties like embedded regex syntax, string interpolation, one-line if/unless that make Perl both more concise and less boilerplatey, which arguably also makes it faster to write.

There is also "faster to maintain". Perls compatibility means that there is almost none of the churn e.g. Python has with regard to syntax and semantics changes. Perl code from almost 3 decades ago usually works quite fine, whereas Python code breaks in every minor version upgrade and needs a complete rewrite for major versions

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

#400
post #394

Earlier quoted context omitted.

> it is not the notorious "write only" language that many troll it to be I dispute that. I have worked with many languages, and Perl has always been one of the hardest to remember due to non-standard symbol abuse and a few strange semantics. There is a reason it has that reputation. Even writing it isn’t easy. I can describe the Python syntax after years of not using it. Perl? No way I remember it.

> I have worked with many languages, and Perl has always been one of the hardest to remember due to non-standard symbol abuse and a few strange semantics. For example?

I mean, the combinations of $%@ are really astoundingly bad. $ alone has so many different meanings and operations depending on context. You won't find that sort of thing in any other language. Not even PHP which for some bizarre reason brought $ along for the ride.

Here's a fun exercise, write a dictionary of arrays. Now write a dictionary of 2d arrays.

In any other language, that's hardly a challenge to both read and write such a structure. Not so with perl.

Post reply on HN