Re:Perl 7 is going to be Perl 5.32, mostly
by noisy_boy on Wednesday June 24, 2020 @01:30PM
(#23631061)
One more: add a proper exception handling setup.
[ Parent
| on HN ]
Re:Perl 7 is going to be Perl 5.32, mostly
by foobar_ on Wednesday June 24, 2020 @01:48PM
(#23631332)
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.
Re:Perl 7 is going to be Perl 5.32, mostly
by mfontani on Wednesday June 24, 2020 @02:06PM
(#23631595)
> 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} }
into:
say join "\t", $foo->{bar}[0]{quux}->@*;
Whether that's better or worse, it's debatable.
Re:Perl 7 is going to be Perl 5.32, mostly
by foobar_ on Wednesday June 24, 2020 @02:22PM
(#23631831)
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.