HNHacker News
TopNewBestAskShowJobs

Grinnz

206 karma · joined September 17, 2018

submissionscomments
Grinnz··on Perl 6's given: switch on steroids
Don't use it in Perl 5. You have to first read the whole documentation on what when does[1] and then the whole documentation on what smartmatch does[2] and then you probably still won't know what will happen if you compare two values that might or might not be numbers, because Perl does not make this distinction for you, so smartmatch guesses. There is a reason every other operator has explicit stringy and numeric comparison versions, and optional new stringy bitwise operators were added because they had the same ambiguity[3].

[1] https://perldoc.pl/perlsyn#Experimental-Details-on-given-and...

[2] https://perldoc.pl/perlop#Smartmatch-Operator

[3] https://perldoc.pl/feature#The-'bitwise'-feature

Grinnz··on Perl 11
> I do not think of Perl 6 as Perl, despite the naming and people involved. I believe that it is as easy to migrate from Perl 5 to another scripting language as it is to migrate to Perl 6.

These beliefs are shared by most users of both languages, which makes bringing up Perl 6's capabilities in a Perl vs Python discussion confusing.

Grinnz··on Mojolicious 8.0 released: Perl real-time web framework
There is a long list of bug fixes and enhancements that have been made in the fork, many of which are critical in my opinion: https://metacpan.org/pod/Cpanel::JSON::XS#cPanel-fork
Grinnz··on Mojolicious 8.0 released: Perl real-time web framework
Since it is built from the ground up around an event loop, asynchronous requests and responses as well as websockets work much more naturally. With Plack-based frameworks the PSGI spec is not built for asynchronous behavior, so you have to rely on hacks and use specific PSGI servers like Twiggy.
← PreviousPage 4 of 4