Editions

Lance Bachmeier no at spam.net
Mon Apr 7 15:20:54 UTC 2025


On Tuesday, 1 April 2025 at 16:21:59 UTC, Atila Neves wrote:
> https://github.com/atilaneves/DIPs/blob/editions/editions.md

Perl's [use 
version](https://perldoc.perl.org/functions/use#use-VERSION) 
should be included as prior work. Perl has `use feature`, so if 
you want to add a modernized version of the `say` function, you 
add `use feature 'say'` to your script. Versions have feature 
bundles, so `use 5.24.1` is the same as adding `use feature` for 
every feature in the bundle.

> One possibly way to bound this complexity could be to only 
> support the last N editions, for N < 5.

I think that should be decided at the time the edition is added. 
For instance, one of your examples is `@safe` by default. If 
instead there was an edition with `@system` by default, that 
would amount to certain checks not being done, and I don't think 
skipping checks in the compiler will make the compiler complexity 
explode even after many editions. I'm sure other editions would 
greatly complexify the compiler, so there should be a limit on 
the number of releases they're supported. I guess my point is 
that dropping editions after a certain number of releases should 
only be done if there's a strong justification.


More information about the dip.development mailing list