Perl / PPCs

This repository is for Requests For Comments - proposals to change the Perl language.
61 stars 22 forks source link

RFC 0015: Add RFC draft about removing apostrophe as package separator #18

Closed nicomen closed 2 years ago

neilb commented 2 years ago

As per the Pre-RFC discussion, I think we're looking at two steps:

  1. in 5.38, any use of ' as package separator should produce a warning, saying that this will be dropped in 5.40
  2. In 5.40 we drop all support for ' as a package separator.

The real driver for this is to let people write "blah blah $user's zorkmid", without having to put braces around user, but better to drop all support than leave partial support for something we don't think people should do anyway.

perlpolicy says, on deprecation:

Generally, backward incompatible changes will have deprecation warnings for two release cycles before being removed, but may be removed after just one cycle if the risk seems quite low or the benefits quite high

Given ' has been discouraged for many years now, I think we can go with a single year.

In the meantime, we can update core modules and CPAN modules, to deal with uses of can't and the like.

nicomen commented 2 years ago

I guess that means: 5.38 do alternatives 4 + c, and for 5.40 alternatives 1 + b ?

I haven't touched up on the c solution, but I'm willing to try.

nicomen commented 2 years ago

I would also like some help to fill in the sections I have left empty or missed to make the RFC more correct if that's needed.

exodist commented 2 years ago

As the maintainer of Test-Simple, I would be happy to add a warning to isn't() when/if this is adopted. I will also modify the code to define it using :: instead of ' so that on old versions of perl it continues to work as-is (with warning) and once support is dropped Test-Simple would not break and no changed would be needed.

exodist commented 2 years ago

just occurred to me that the warning would result in a double-warning when perl has its own warning, so I will not have it warn on perls that have their own warning about it, or maybe not warn at all on the test-simple end.

nicomen commented 2 years ago

just occurred to me that the warning would result in a double-warning when perl has its own warning, so I will not have it warn on perls that have their own warning about it, or maybe not warn at all on the test-simple end.

@exodist I guess for internal building of perl5 with cpan/Test-Simple the usage of isn't would need to be gone for 5.39 development at least, the declaration seems to be "clean" using *isn::t = \&isnt

In the RFC I think I only mentioned that it needed documentation changes if we weren't going for the "accept ' as part of identifier" path.

rjbs commented 2 years ago

@nicomen What is the status of this as any form of implementation?

nicomen commented 2 years ago

I'm basically waiting for an approval of the RFC itself to continue. The implementation I have done removes the feature altogether so it needs some more work to only warn in phase 1.

rjbs commented 2 years ago

@nicomen Thanks. Sorry for the long confusion on process issues. This is now in the "Implementing" phase, waiting for an implementation we can test for shipping.

nicomen commented 1 year ago

Great. Do you prefer a pull request against blead for the implementation?

nicomen commented 1 year ago

Klingoon issue in autodie is now fixed too \o/ Thanks to @toddr  pjf/autodie#115