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

Re: removing the old-style package separator

Thread Previous | Thread Next
From:
Dan Book
Date:
August 17, 2021 05:48
Subject:
Re: removing the old-style package separator
Message ID:
CABMkAVWbfb-iKyW_M+BbU_WLUH5TszPwMmX9VBzu88sh-a45_g@mail.gmail.com
On Mon, Aug 16, 2021 at 11:51 PM Yuki Kimoto <kimoto.yuki@gmail.com> wrote:

>
> 2021-8-15 12:09 Ricardo Signes <perl.p5p@rjbs.manxome.org> wrote:
>
>> Porters,
>>
>> Since at least 2009 <http://markmail.org/message/gaux5xx5jlop3vmk>, we
>> have been talking, once in a while, about deprecating the use of
>> \N{APOSTROPHE} as a package separator, Ada style.
>>
>> The following two expressions are equivalent:
>>
>> $x::y::z
>>
>> $x'y'z
>>
>>
>> This mostly goes unnoticed, but the confusion sometimes seeps in at:
>>
>> print "This is $user's problem to deal with."
>>
>> …which attempts to interpolate $user::s
>>
>> This bites experts and new users alike, and while the apostrophe *might*
>> be aesthetically pleasing as a package separator, that battle has basically
>> been lost.
>>
>> I think the next course of action is to see what on CPAN would really
>> break if the old package separator was removed.  I predict "very nearly
>> nothing."  Then, to add a deprecation warning for when it is used, with a
>> drop dead date.  That is, assuming that we don't realize there's some
>> reason we really ought not to do this.
>>
>> This is a low-value win, but I think it's a win.  Shall we carry on to
>> RFC this?
>>
>> --
>> rjbs
>>
>
>  Is this proposal lexical removal using "no feature 'foo'" or global
> removal?
>
> Can this be solved with a lexical tokenizer?
>
> If possible, wouldn't it be okay to break nothing?
>

This proposal is for deprecation and removal, which would not be lexical as
the parser would subsequently not support it at all.

The alternative proposal of only disabling it within string interpolation
could be a lexical feature. I don't think it's worth the complexity in
either implementation or explaining why it works differently there, when
the only uses of the feature are for jokes.

-Dan

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