develooper Front page | perl.perl5.porters | Postings from February 2022

Re: PSC #055 2022-02-18

Thread Previous | Thread Next
Ricardo Signes
February 21, 2022 03:07
Re: PSC #055 2022-02-18
Message ID:
On Sun, Feb 20, 2022, at 9:47 PM, Oodler 577 via perl5-porters wrote:
>> This could be done by dual-lifing the feature pragma, but that would make it a lot hairier. We decided that this would be better started off as a CPAN pragma, to see if there is much interest in something like this.
> I don't understand the general case, would you be so kind to expand whenever
> you have a spare cycle? E.g., what other things would fall into this and in
> what cases would something get "promoted" (not sure if that's the right term)
> from "use feature" -> "use trustworthy::feature"? Is this creating another
> kind of "feature" or "experiment" class?

I can explain it, I think, very clearly.

An experimental feature has an uncertain future.  It may change behavior in the next release, or even be removed.

Eventually, some experiments stop changing behavior and are enshrined as official behaviors.

For *those* features, using them in an older version of perl where their behavior is identical to the enshrined behavior *is no longer uncertain*.  It should not bear the scary name "experimental".

Back to specifics:  Consider the "postderef" feature.  This feature was added in v5.20 as an experiment.  In v5.24, it was made non-experimental, and there was no change in behavior.  Dist::Zilla, code I wrote, requires only v5.20 of perl.  I would like to use postderef in Dist::Zilla, but I don't want to write "use experimental 'postderef'" in the code and make people believe it's using experimental features.  It's using stable features that were not *declared* stable in v5.20, but effectively were stable, and we know that now.  Neil is describing a CPAN module that allowed me to turn on experiments only if they were already at their stable behavior on the running version of perl.

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About