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

Re: RFC: Multiple-alias syntax for for

Thread Previous | Thread Next
From:
Dan Book
Date:
June 10, 2021 01:38
Subject:
Re: RFC: Multiple-alias syntax for for
Message ID:
CABMkAVVeYaZG20iKbE1LSH=Rvrw50=qh8UntPekdAa0ZJagHQQ@mail.gmail.com
On Wed, Jun 9, 2021 at 7:44 PM Nicolas Mendoza <mendoza@pvv.ntnu.no> wrote:

>
> 1) since it looks like such an obvious improvement but hasn't been done
> before, is there some reason that one hasn't gone down this route
> before? Are there some hidden gotchas about it? Or is it just genius
> overlooked simplification?
>

I suspect no proposal has gotten far enough in implementation yet to be
usefully discussed.


> 2) will this work flawlessly with for instance: for my ($key $value,
> %rest) = (%hash) { … } (iterating only once)
>

I don't see why this should be supported and complicate the implementation,
since you can just do that assignment without any loop.


> 3) will it work transparently with foreach (I believe I saw some
> comments about that)
>

Not sure what you mean; this is a feature specifically for foreach.

-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