in reply to Re^2: Experimental features: autoderef vs postfix deref
in thread Experimental features: autoderef vs postfix deref

Very helpful posts by both AnonyMonks, thanks. Does it go without saying that if it's been deemed non-experimental in blead that it's safe to use in prod code now, and ok to use in PerlMonks replies without applying the 'careful, experimental' blurb?

  • Comment on Re^3: Experimental features: autoderef vs postfix deref

Replies are listed 'Best First'.
Re^4: Experimental features: autoderef vs postfix deref
by Anonymous Monk on Jul 12, 2015 at 14:06 UTC

    I'd say it's not final until the 5.24 release is made in a little less than a year. And even if it becomes non-experimental then, code posted here with those features will always require the blurb "requires at least Perl v5.24" and/or a use 5.024; at the top of the code. Plenty of monks and visitors are still stuck with old Perls; circumfix deref will remain the most backwards-compatible way to do it.

      Yeah, after I posted my question you replied to, I got to thinking about what you said here before I read your post. In a reply to BrowserUK in Re^2: Experimental features: autoderef vs postfix deref, I come to the same conclusion regarding backwards compatibility.

      Best to stick with what has worked, and what will for sure work going forward.

      Thanks,

      -stevieb

      use feature qw( postderef ); and no warnings qw( experimental::postderef ); will continue to work even though they won't be needed in 5.24. Similarly for the third-party tool use experimental 'postderef';.

      use feature qw( postderef_qq ); will continue to be needed to use this syntax in double-quoted strings.

Re^4: Experimental features: autoderef vs postfix deref
by ikegami (Patriarch) on Jul 13, 2015 at 17:10 UTC
    Answering for this particular case only, I'd say yes, it's safe. No problems were encountered, and there's no reason to expect that any will. It's an uncontroversial feature whose promotion out of experimental status was unanimous. It will only officially come out of experimental when 5.24 comes out next May-ish, but it's safe bet it will.

      Thank you for this, ikegami, it's what I was hoping to hear.

      After spending most of the day yesterday learning about the process of how experimental features are implemented, discussed, life cycle etc, I'm confident that postderef is one that'll stay around.

      I think I'll take one of my past modules where there are a lot of circumfix ops, and replace with postderef just to see if the overall readability is improved while scanning a file or not.