from Hacker News

Perl 5.18.0 is now available

by yko on 5/18/13, 2:39 PM with 66 comments

  • by acqq on 5/18/13, 3:46 PM

  • by Su-Shee on 5/18/13, 3:57 PM

  • by jerf on 5/18/13, 6:24 PM

    Can someone explain the point of the lexical subroutines? [1]

    In particular, I'm lost on the difference between

        sub outer {
            my $closurevar;
            my $inner = sub {
                ... use $closurevar...
            };
        }
    
    and

        sub outer {
            my $closurevar;
            my sub inner {
                ... use $closurevar...
            }
        }
    
    (I mean this as an honest question. That said, I do hope that I'm missing something and this is more than just a syntax gloss.)

    [1]: http://search.cpan.org/~rjbs/perl-5.18.0/pod/perlsub.pod#Lex...

  • by btipling on 5/18/13, 6:09 PM

    The dynamic scoping in Perl seems a bit troublesome to me. Maybe even a security issue. Can you prevent functions you call from accessing variables in your scope? Do you have to somehow sanitize your scope if this is an issue? Seems a little bit worrying. With the exception of closures inside nested functions, I wish functions just had their own scope and if you want them to have anything else, just pass it in.
  • by greyman on 5/18/13, 7:57 PM

    Just curious: Is Larry Wall still involved in Perl development? Haven't heard from him for a long time...
  • by alberth on 5/18/13, 3:54 PM

    Only 82 more minor releases until Perl 6 will be available.
  • by creaktive on 5/18/13, 4:09 PM

  • by mpyne on 5/18/13, 8:47 PM

    I understand why smartmatch is labeled experimental, but what's the "modern Perl" replacement for given/when? I only use it as a stupid switch statement but I don't want it breaking with Perl 5.22 either...
  • by prollyignored on 5/18/13, 4:19 PM

    I was a Perl lover once.

    And now it seems I understand the haters.

    Just don't use Perl.

    The language seems fine, productive, even sublime at first but you will encounter some horrible design features.

    Just read the following,

    http://markmail.org/message/h2spyi5za4qheuft

    -- Perl's data structure serialization is leaky. Thought you made an int ? Whoa ... serialized as a string.

    http://blogs.perl.org/users/rurban/2013/02/no-indirect-consi...

    -- A language feature causing a burnout ? Well fuck me !

    That's just a tip of the iceberg.

    PHP, a fractal of bad design ?

    Perl, a quantum bomb, waiting to tick off.

    The Modern Perl movement is like saying "I'll close my eyes and crime ceases to exist."

    No best practices will save you from broken language features.

    The people who maintain Perl source code, are not a _fan_ of Modern Perl. They won't make "strict" the default or introduce signatures or better OOmodel.

    The people who proclaim "Modern Perl" won't fork.

    Even this release shows how clueless Perl maintainers are !

    * They released a switch statement long long back

    * And now they mark it even as "experimental" because of the leaky "my $_" scope.

    Oh God ! I will never emotionally invest in another tool.

    EDIT: Neutral language.

  • by will1000 on 5/18/13, 7:28 PM

    Is python 3 the new perl 6?