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

Re: PSC #049 2022-01-07

Thread Previous | Thread Next
From:
Tony Cook
Date:
January 10, 2022 23:09
Subject:
Re: PSC #049 2022-01-07
Message ID:
20220110230850.GC3065@venus.tony.develop-help.com
On Mon, Jan 10, 2022 at 03:44:52AM -0800, Darren Duncan wrote:
> When a file says "use v5.36" or a higher version, it causes signatures to be
> available non-experimentally AND it causes @_ to not be declared within the
> scope of any sub using a signature, wherein any references to @_ will fail
> AT PARSE/COMPILE time.

This isn't practical with the way features work.

When you:

  use v5.36;

the hints word is updated with the number of the bundle of features
for that version.

Now just that could work, the code could check for that specific
feature bundle number, *but* if the code then enables or disables any
feature, then the bundle number is set to the "custom" bundle, and
features are stored in %^H (and mirrored in cop_features for
performance), and the feature bundle number check will no longer work.

So for this to work, we'd need a separate signatures
(eg. "signatures36") bundle with the new behaviour, if the user wanted
to disable signatures for a brief section of code, eg if they want to
define several prototyped functions, they'd neeed to C<no feature
"signatures36";>.

So it gets ugly.

Tony

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About