[Purdue-pm] Perl 5.32 is coming!

Dave Jacoby jacoby.david at gmail.com
Mon Jan 27 09:56:53 PST 2020


https://www.effectiveperlprogramming.com/2020/01/perl-v5-32-new-features/

And brian d foy says:

*    The new isa infix operator (“class instance”)
*    The streamzip program comes with IO::Compress::Base, so it comes with
perl
*    Script runs are no longer experimental
*    Alpha assertions are no longer experimental
*    Mixed mode access to undef uses a temporary file
*    "0" .. "-1" is fixed
*    Modifiable contexts in constants now throw an exception

isa is  a thing that is used in OOP. I think current use is something like
isa( $lafayette, 'Location' ) to shoehorn types into a language that didn't
want them, and this simply means we can do if ( $lafayette isa 'Location' )
{ ... } , which looks nicer.

If you have a modern perl, you can ls *pl | streamzip > file.zip or
something. I've not had reason to want that, but sure.

I do not understand what Script runs are, and I don't see them in the
"experimental" pod. No do I understand what Alpha assertions are.

Similarly, "Mixed mode access to undef uses a temporary file" is a sentence
where I can understand each individual word, and mostly what two adjacent
words mean together, but that sentence as a whole is word salad.

I don't know what was broken about "0" .. "-1", but I can guess. .. is a
range operator, and 0 .. 1 would give [0,1], but if you want [-1,0], you
should do reverse [ -1..0 ] because the range operator doesn't do
descending values. But, as Gizmo showed when we were discussing "29 Palms",
you can iterate through character values, and so I would GUESS that "0" ..
"-1" would give a large array. Maybe? Testing.

Ah. It gives you the same result as 0..99. At least in 5.30.

"Modifiable contexts in constants now throw an exception". I can't remember
using constants in Perl. but I think this means this: if $val is a constant
reference to an array, that array can change, but I can't point to another
array in $val, so now, the following code should announce itself as
problematic.

use constant ARRAY => [1,2,3,4];
push ARRAY, 5;

I believe I have been clear in my lack of understanding of some parts of
this. The 5.31 deltas seem to point to differences between 5.31.x and
5.31.y, not 5.30 and 5.31 and what will become 5.32, so we'll know more
later.

-- 
Dave Jacoby
jacoby.david at gmail.com

I deal with my software the way I treat my eldritch abomination:
 It's not human, it's not even alive in the natural sense.
 It's nightmare-born and nightmare-shaped, and nightmares don't die easy.
  -- @yenzie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.pm.org/pipermail/purdue-pm/attachments/20200127/88455a2f/attachment.html>


More information about the Purdue-pm mailing list