On Fri, Oct 5, 2018 at 8:33 AM Timo Paulssen t...@wakelift.de
<http://mailto:t...@wakelift.de> wrote:

It's important to point out that inside metaoperators ("composed
> operators", "combined operators", ...) the [ ] are just for bracketing
> things together — sometimes it's needed to disambiguate, but you can put
> it in anyway to make things clearer.
>
> This has nothing to do with [+] 1, 2, 3, which is a way to spell "add
> these three numbers together".
>
Timo—is this fact formalized in the docs? I can’t find it.
https://docs.perl6.org/routine/= doesn’t mention it, and while
https://docs.perl6.org/language/operators#Assignment_operators gives an
example of using it (with +=, -=, min= and ~=), I can’t find the
metaoperator version’s definition.


> On 05/10/2018 14:26, Brad Gilbert wrote:
> > Note that = is actually a meta operator that can take an infix
> > operator as an argument
> >
> > So
> >
> >     $a += 1
> >
> > is really short for
> >
> >     $a [+]= 1
> >
> > On Fri, Oct 5, 2018 at 1:02 AM Todd Chester <toddandma...@zoho.com>
> wrote:
> >>
> >>
> >> On 10/4/18 12:13 PM, Brandon Allbery wrote:
> >>> It's fine syntactically, but I think has no effect because it'd be '$v
> =
> >>> $v' after the '+|='. Conceivably some future version of rakudo could
> >>> warn about it having no effect.
> >> That explains it.  Thank you!
>

Reply via email to