On Fri, 3 Jul 2020 19:22:03 +0200 demerphq <demerphq@gmail.com> wrote: > We want to eventually ditch the perl 5 variant, and move to a saner > perl 7 or 8 variant, which means that ast some point we want the > parser to not know about 5 AT ALL, except when it throws exceptions. > Making the rule be "the parser starts out expecting perl 5" simply > does not make sense, for *any* version. Making the rule be "the parser > starts out expecting perl $Latest" does. Right now, we start off in "version 5" mode until we see a "use VERSION" which alters the idea. We should *strongly encourage* everyone to be explicit with their version statements. It is a shame more people haven't been using "use VERSION" so far, though that can be explained by the fact it isn't very powerful yet. Suggestions have been made that it should "use warnings" and so on - these could definitely help. How about this as an idea: At some point in the future, the semantics changes very slightly to: We start off in "guess probably version 5" mode, wherein any non-whitespace/comment syntax we see other than an explicit "use VERSION" statement provides a warning that the user didn't declare their version requirement. We'll continue presuming v5 for now unless they asked for something else, but that warning gives people a hint, a nudge that they should be explicit now. At some later point beyond that, it becomes a hard error. We can now delete all the old version-5 compat code in the core because we know (from the previous deprecation round and warnings) that everyone has been explicit on their version requirements. Plus now, since we know everyone is being explicit in their version requirements, we can continue to do the same trick further down the line; maybe at a hypothetical version 15 a few decades from now people have to start dropping version 7. That's all still fine, because everyone declared the version they wanted. This isn't a new idea, various folks have already suggested it already: Dave Mitchell - https://www.nntp.perl.org/group/perl.perl5.porters/2020/06/msg257566.html BooK - https://www.nntp.perl.org/group/perl.perl5.porters/2020/06/msg257567.html Darren Duncan - https://www.nntp.perl.org/group/perl.perl5.porters/2020/06/msg257666.html https://www.nntp.perl.org/group/perl.perl5.porters/2020/06/msg257607.html with whom myself and Christian Walde agree - https://www.nntp.perl.org/group/perl.perl5.porters/2020/07/msg257781.html https://www.nntp.perl.org/group/perl.perl5.porters/2020/07/msg257784.html -- Paul "LeoNerd" Evans leonerd@leonerd.org.uk | https://metacpan.org/author/PEVANS http://www.leonerd.org.uk/ | https://www.tindie.com/stores/leonerd/Thread Previous | Thread Next