rsFalse has asked for the wisdom of the Perl Monks concerning the following question:

UPD: answered; I was using old perldoc perlre document

Hi,
When I open perldoc perlre, after atomic grouping (?>...), code (?{...}), and some other constructs, it is written:
"WARNING: This extended regular expression feature is considered highly experimental, and may be changed or deleted without notice."
And it seems that these constructs has been known lot of years ago, for example, I find atomic grouping (?>...) in 2002 J.Friedl's book "Mastering Regular Expressions" (II ed.).
So: 1) how long experiments will take on these constructs? 2) is it a good practice to use experimental constructs in book (as J.Friedl used)?..if they are only experimental? 3) what to do for newer programmer if he read that these features are experimental: a) use them? b) wait until there will not be such warnings that feature can be deleted?
And one more question: should I use "given/when" if it is experimental?
  • Comment on regex experimental constructs: use or not use ?

Replies are listed 'Best First'.
Re: regex experimental constructs: use or not use ?
by perlron (Pilgrim) on Nov 03, 2014 at 12:38 UTC
    HI
    Just an FYI, but. did you check the latest version of the perlre documentation for perl 5.20.1.

    The temporal difficulty with perl is u need to know C well to know the awesome.else u just keep *using* it and writing inefficient code
      Thank you, after I googled, somehow I has opened and was reading v5.8.8 documentation. In new documentation there are no such warnings.

        If you are a new to Modern Perl (like me) then i suggest you start using perlbrew with cpanm. that way when you are working on x version of perl on your *nix system, ideally your perldoc looks at the x version of the documentation. (i tested this just now using perlrew :D for your benefit).

        The temporal difficulty with perl is u need to know C well to know the awesome.else u just keep *using* it and writing inefficient code
Re: regex experimental constructs: use or not use ?
by BrowserUk (Patriarch) on Nov 03, 2014 at 13:06 UTC

    Another 70 odd years and it'll be a contender for the longest running experiment, though I doubt the results will be as clear cut.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
Re: regex experimental constructs: use or not use ?
by dave_the_m (Monsignor) on Nov 03, 2014 at 21:29 UTC
    The caveats were removed from the documentation in release 5.20.0. Note also that the (?{...}) feature was completely re-implemented for 5.18.0; before then it was very buggy, and could crash interpreter if you used lexical vars within the code block

    Dave.