top | item 5729056

Perl 5.18.0 is now available

128 points| yko | 12 years ago |nntp.perl.org

66 comments

order

Su-Shee|12 years ago

chromatic|12 years ago

To be fair, so does Perl 5. Perl 5.18.0 happens to be the yearly major release.

To my knowledge, Rakudo hasn't reached the point where its developers call any Star (runtime plus libraries) release a "major release" of the sort that users ought to use in the wild for a year or more.

PommeDeTerre|12 years ago

From the perspective of somebody who needs a production-grade Perl implementation, Rakudo doesn't cut it, I'm saddened to say.

Monthly releases are a good step in the right direction, but they aren't very useful to those of us who need something more robust.

Perl 5 currently offers this robustness, while Rakudo unfortunately does not. The other Perl 6 implementations end up being worse than Rakudo in this respect, as well.

rmah|12 years ago

Perl 6 isn't perl.

jerf|12 years ago

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

latk|12 years ago

In the end, everything is syntax. In the first solution, the inner sub would be called as "$inner->()" or "&$inner()". With lexical subs, we get the much nicer syntax "inner()". This decreases the syntactic pain when structuring your code to use nested functions, thus encouraging good design.

Oh, and I guess lexical subs can have prototypes, which were ignored when calling a coderef with `&` or `->()`. This allows to create really nice, but properly scoped pseudosyntax.

btilly|12 years ago

Aside from the syntactic differences, I would assume that lexical subroutines can have prototypes while subroutines stored in variables cannot.

btipling|12 years ago

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.

btilly|12 years ago

This is why wise Perl programmers turn on use strict, and then declare variables with my. Now attempting to dynamically scope stuff is a compilation error. (Except for some built in variables, like $_. Which you don't use in real programs.)

This has been standard advice since the last millennium. But you can't change it without breaking backwards compatibility.

That said, I do have several good uses for local. But not normal ones. My favorite is to use local to dynamically scope entries in a hash. I wind up using this every year or two to put in an automatic check to catch infinite recursion.

rmah|12 years ago

When I first started using perl, I too, worried about this and other similar issues. But after 10+ years of using perl, I've never -- not once -- actually run into this problem in the real world.

chromatic|12 years ago

Can you prevent functions you call from accessing variables in your scope?

Perl's access control model uses a metaphor of polite permission. Without hardware enforcing memory protection, any memory protection at the language level is a modest barrier for the determined anyhow.

greyman|12 years ago

Just curious: Is Larry Wall still involved in Perl development? Haven't heard from him for a long time...

sigzero|12 years ago

He is solely working on Perl 6 now.

wazoox|12 years ago

He's not involved in Perl 5 development anymore AFAIK.

alberth|12 years ago

Only 82 more minor releases until Perl 6 will be available.

latk|12 years ago

Almost ;-) The current perl version is 5.018000, so that would take 982 releases until the numbering scheme breaks down. Of course, Perl v-strings can have elements of INT_MAX each, but I doubt such high numbers would ever be used, for back-compat reasons.

sigzero|12 years ago

Perl 5 will not ever go to Perl 6. Although you probably forgot the sarcasm tag. :)

mpyne|12 years ago

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

jevinskie|12 years ago

I feel like I was given the impression that they wanted to get smart match "right" and not abandon it. I guess my use of smart match was a mistake. =(

prollyignored|12 years ago

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.

hahainternet|12 years ago

I downvoted you because of

a) The poor formatting of your post as a stream of conciousness

b) The condemnation of a language based on a single relatively minor bug

c) The unsupported assertions and unrelated criticisms like not enabling strict by default

will1000|12 years ago

Is python 3 the new perl 6?