Hi Marcel, It almost looks to me that a pair of characters--possibly
the two colons--is being interpreted as an alternative delimiter for
the tr/// operator. I'd suggest this is a bug, so you should consider
opening an issue on Github. But I have little experience with "named
attributes", so does anyone else care to chime in?

Best, Bill.


On Wed, Aug 26, 2020 at 5:31 AM Marcel Timmerman <mt1...@gmail.com> wrote:
>
> Hi everyone,
>
> I was experimenting with extended identifiers and found that it is not 
> possible to use it in named attributes. E.g.
>
> > sub a (:$x:y) { say $x:y; }
> ===SORRY!=== Error while compiling:
> Unsupported use of y///.  In Raku please use: tr///.
> ------> sub a (:$x:y) { say $x:y; }
>
>
> > sub a (:$abc:def) { say $abc:def; }
> ===SORRY!=== Error while compiling:
> Invalid typename 'def' in parameter declaration.
> ------> sub a (:$abc:def) { say $abc:def; }
>
> Is there a trick of some sort to get this done? At the moment I can only use 
> a slurpy hash and check for its keys. This is good enough for me but out of 
> curiosity I ask. If not possible, an extra note in the documentation on named 
> arguments would be necessary.
>
> regards,
> Marcel
>
>

Reply via email to