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