develooper Front page | perl.perl5.porters | Postings from July 2020

Re: So are refaliasing and declared_refs stable?

Thread Previous | Thread Next
From:
Alexander Hartmaier
Date:
July 21, 2020 19:41
Subject:
Re: So are refaliasing and declared_refs stable?
Message ID:
CAB49QrYzFrsgvejnx2goc-sr=QBHaNqQYG97Z9qOZ8xz5FibHA@mail.gmail.com
On Tue, Jul 21, 2020 at 2:37 AM Eric Brine <ikegami@adaelis.com> wrote:

> [I jumbled two thoughts together in my original email. This revises it.]
> On Mon, Jul 20, 2020 at 7:29 PM Eric Brine <ikegami@adaelis.com> wrote:
>
>>
>> In reference to https://github.com/Perl/perl5/wiki/SC-Notes-2020-07-14
>>
>> 1. We see that refaliasing is going to be on by default in Perl 7. Yet,
>> refaliasing is still experimental in Perl 5.32! Are there any known issues
>> or concerns with refaliasing?
>>
>> 2. The example code for what is going to be on by default in Perl 7
>> requires the declared_refs feature. [...]
>>
>
> 2a. Yet, declared_refs feature is slated to be off by default. Some
> clarification, please?*
>
> 2b. Yet, declared_refs is still experimental in Perl 5.32! Are there any
> known issues or concerns with declared_refs?
>
>
>> * The document acknowledges there was some confusion among the attendees
>> as to the difference between the two features. It's quite simple:
>>
>> \@a = [];     # Requires refaliasing
>
>> \my @a = [];    # Requires refaliasing
>> my \@a = [];    # Requires refaliasing and declared_refs
>>
>
>
Although I read perldelta when a new major version comes out this is the
first time I saw this. I had to go back to perl5260delta to find it in
https://metacpan.org/pod/distribution/perl/pod/perl5260delta.pod#Declaring-a-reference-to-a-variable
.
I wonder why the postfix dereferencing syntax isn't used for a new features
as that's newer and thus preferred way of dereferencing: my @a->@* = [];
Is this even allowed? I guess not.
Postfix dereferencing was declared stable in 5.24 so was available when
this was introduced in 5.26.
Thoughts?

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