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

Re: removing the old-style package separator

Thread Previous | Thread Next
From:
Ed Avis
Date:
August 20, 2021 05:16
Subject:
Re: removing the old-style package separator
Message ID:
DM4PR11MB52473C9D6D3B0BF3719B6BE19DFC9@DM4PR11MB5247.namprd11.prod.outlook.com
I suggested that a first step to remove the old package separator could be to forbid it in variable names. Subroutine names like don’t would still be allowed, but $a’b would not. Since it can no longer appear in variable names, the problem of doublequoted strings goes away.

I am quite in favour of removing it altogether, but I recognize that subroutine calls with ‘ exist in the wild, so this might be a less disruptive first step. I think that it is simpler and less confusing to just forbid ‘ in variable names than to change the behaviour of doublequoted strings while continuing to allow ‘ everywhere else.

(please ignore confidentiality stuff below here)
________________________________
De: Paul "LeoNerd" Evans <leonerd@leonerd.org.uk>
Enviado: Sunday, August 15, 2021 2:18:50 PM
Para: Leon Timmermans <fawaka@gmail.com>
Cc: Ricardo Signes <perl.p5p@rjbs.manxome.org>; Perl 5 Porters <perl5-porters@perl.org>
Asunto: Re: removing the old-style package separator

On Sun, 15 Aug 2021 13:02:58 +0200
Leon Timmermans <fawaka@gmail.com> wrote:

> As far as I can tell, all the pain relates to quoted strings. I would
> argue we should remove them only there, that would have all the
> benefits without actually breaking anything.

Yes and no.

The trouble with doing that is it would increase the difference in
quoting rules between qq()ed strings and elsewhere.

On Libera/#perl yesterday we encountered a new one that nobody seemed
to be previously aware of:

eval: my $x = "scalar"; my @x = ("array"); [ $x[0], ${x}[0], "$x[0]", "${x}[0]" ]

      [ 'array', 'array', 'array', 'scalar[0]' ]

Notice how the braces of `${var}[0]` act differently inside qq()ed
strings as compared without.

I'm not sure I'd like making ' act in a similarly inconsistent way
between these two places.

--
Paul "LeoNerd" Evans

leonerd@leonerd.org.uk      |  https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmetacpan.org%2Fauthor%2FPEVANS&amp;data=04%7C01%7Ced.avis%40qmaw.com%7C9142d32e22934d7756af08d95fe6e57c%7Cd8fde2f5939242608a030ad01f4746e9%7C0%7C0%7C637646267567589404%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=CrzP8X7ezfXhSuCo6B2fvjqTTf1%2BVDrNBfa%2FvQkST1w%3D&amp;reserved=0
https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.leonerd.org.uk%2F&amp;data=04%7C01%7Ced.avis%40qmaw.com%7C9142d32e22934d7756af08d95fe6e57c%7Cd8fde2f5939242608a030ad01f4746e9%7C0%7C0%7C637646267567589404%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=%2BtiagmxgWqO%2FqFBFlKwcAltGrHCW6zbU7Qn9Qth5FWw%3D&amp;reserved=0  |  https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.tindie.com%2Fstores%2Fleonerd%2F&amp;data=04%7C01%7Ced.avis%40qmaw.com%7C9142d32e22934d7756af08d95fe6e57c%7Cd8fde2f5939242608a030ad01f4746e9%7C0%7C0%7C637646267567589404%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=4BWPr%2BOwc%2FdJRWJhXCJagZhHcWDQ%2BMS%2Bem1tD9njCXQ%3D&amp;reserved=0

This email and any files transmitted with it are CONFIDENTIAL and are intended solely for the use of the individual(s) or entity to whom they are addressed. Any unauthorised copying, disclosure or distribution of the material within this email is strictly forbidden. Any views or opinions presented within this email are solely those of the author and do not necessarily represent those of PGIM Limited, QMA Wadhwani LLP or their affiliates unless otherwise specifically stated. An electronic message is not binding on its sender. Any message referring to a binding agreement must be confirmed in writing and duly signed. If you have received this email in error, please notify the sender immediately and delete the original. Telephone, electronic and other communications and conversations with PGIM Limited, QMA Wadhwani LLP and/or their associated persons may be recorded and retained. PGIM Limited and QMA Wadhwani LLP are authorised and regulated by the Financial Conduct Authority. PGIM Limited (registered in England No. 3809039) has its registered office at Grand Buildings, 1-3 Strand, Trafalgar Square, London WC2N 5HR and QMA Wadhwani LLP (registered in England No. OC303168) has its registered office at 9th Floor, Orion House, 5 Upper St. Martin's Lane, London, England, WC2H 9EA.

Please note that your personal information may be stored and processed in any country where we have facilities or in which we engage service providers. If you provide personal information to us by email or otherwise, you consent to the transfer of that information to countries outside of your country of residence and these countries may have different data protection rules than your country.

To learn about our privacy policies, please use this link<https://www.pgim.com/disclaimer/privacy-center> to read the Privacy Notices.

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