Front page | perl.perl6.users |
Postings from November 2020
Re: The ,= operator
Thread Previous
|
Thread Next
From:
Joseph Brenner
Date:
November 29, 2020 17:16
Subject:
Re: The ,= operator
Message ID:
CAFfgvXX5QbVkFWn2r7_TjkyuCDFfm-NhPu9mF4FAYCCoJJci0A@mail.gmail.com
William Michels <wjm1@caa.columbia.edu> wrote:
>> > "Perhaps more importantly, what improvement do you propose?"
>
> Apologies for top-posting, but what immediately comes to my mind upon
> encountering the creation of a self-referential (circular/infinite)
> object is proverbially 'going-down-a-level' and trying again. So I
> tried 1. 'decontainerizing' the object on the LHS, and then 2. using
> the ",=" postfix to add an additional element (or many). Nothing
> worked.
I think the trouble with ideas like that is once you accept that
@a ,= 'd';
Is necessarily a short-form of:
@a = @a, 'd';
You can see the thing you need to decontainerize is that @a on
the RHS:
@a = | @a, 'd';
But you can't get at it in the short form.
(So you wouldn't normally try to use the short form with arrays.)
Thread Previous
|
Thread Next