develooper Front page | perl.perl5.porters | Postings from March 2021

RFC / POC - more than 32 features

Thread Next
From:
=?UTF-8?Q?Branislav_Zahradn=C3=ADk?=
Date:
March 22, 2021 21:25
Subject:
RFC / POC - more than 32 features
Message ID:
CAB=rbOnxCNZtRTms4+=HbguvH0VTrXfWkijZpcE9xPmq36Ugnw@mail.gmail.com
Hi,

I prepared quick draft of new feature.[ch] - https://pastebin.com/Lnuq3Nec

I hope it's enough to show an idea and evaluate usability.
Doing more involves modification in regen/feature.pl which I don't want to
start without some kind of consensus that it's a good idea (being stuck
with glr parser I need some relax ...)

This mechanism
- supports unlimited number of features
- supports deprecated and prohibited flip
- supports bundle (or better, protocol) composition - ie, doesn't use
cop_hints
- supports different defaults per bundle

* deprecated and prohibited flip
For example, should feature "indirect" be deprecated since 5.38 and
prohibited in 7.0 (default "off" in both), then sequences

use v5.38;
use v5.10; # can raise warning "indirect is deprecated"

use v7.0
use v5.10; # can die "indirect is prohibited"

* composition
Here I'm not sure how it should behave
- for feature manually set it's possible to preserve it's value
- it's possible for bundle/protocol to say "i don't care about this feature"

Example, it's possible to implement, that after this (as an example with
known feature)
use feature 'fc';
use v5.10;

one can still use fc

Best regards,
Brano

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