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

Re: RFC / POC - more than 32 features

Thread Previous | Thread Next
From:
Philip R Brenan
Date:
March 24, 2021 18:34
Subject:
Re: RFC / POC - more than 32 features
Message ID:
CALhwFRnvdL2WuRQW=UqzBev5m-UuxMaoz6bDAc42K9dh0zTsDw@mail.gmail.com
Please provide a feature bit for every feature of Perl so that users can
remove all the features they do not want to obtain a custom language that
reflects their exact requirements with maximal performance unburdened by
features that other people "might" want.

On Wed, Mar 24, 2021 at 10:15 AM Branislav ZahradnĂ­k <happy.barney@gmail.com>
wrote:

>
>
> On Wed, 24 Mar 2021 at 00:54, Tony Cook <tony@develop-help.com> wrote:
>
>>
>> It's not entired clear without a complete implementation, but going by
>> your feature_save() definition it looks like you expect to store
>> several new fields in cop_features (which is where the current feature
>> bits are stored.)
>>
>
>> cop_features is part of every COP, and a COP is currently generated
>> for every statement in your code, so this would significantly increase
>> the memory usage of a large perl program.
>>
>
> True, there is more data to be accessible via cop_features.
> It doesn't need to be stored as value, it can be stored as copy-on-write
> pointer
> (though that's implementation complexity).
>
> On other hand, implementation with bundle only (without protocol parts)
> will currently consume exactly one U32, it will just automatically grow.
>
>
>> The limit on 32-bit features isn't hard, it was mostly laziness (it
>> doesn't need to be done right now) and hubris (I can fix it later), my
>> intent was always to re-work it to support more feature bits when it
>> was needed.
>>
>
> 32-bit is not only one limit, there is also limit with number of bundles.
>
> This one also adds capability to deprecate and/or prohibit flip from
> default value,
> depending on bundle / protocol enable order.
>
> For example:
> sequence "use v7; use v5.10;" may warn or die on some of v5.10 feature
> flips
> (eg: indirect) and still preserve this warn-or-die configuration.
>
> This approach also allows forward compatible programming (assuming there
> will
> be one codebase (5,7, ...) tunable with features into proper one), for
> example:
> (meaning, not implementation) "use preview v8;"
>
> Ad single code base: that is why I'm working on using bison's GLR parser,
> where
> one can include rule based on feature.
>
> So I guess I have to rephrase my question:
>
>
>> At this point we're not close to hitting the limit.
>>
>> Tony
>>
>

-- 
Thanks,

Phil <https://metacpan.org/author/PRBRENAN>

Philip R Brenan <https://metacpan.org/author/PRBRENAN>

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