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

RFC / POC - more than 32 features

Thread Next
March 22, 2021 21:25
RFC / POC - more than 32 features
Message ID:

I prepared quick draft of new feature.[ch] -

I hope it's enough to show an idea and evaluate usability.
Doing more involves modification in regen/ 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
- 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,

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