Not sure if this is p6l or p6c... Fallback to the latter. :)

In this line:

   [Dog ::T $ ($x) where 1, *$, [EMAIL PROTECTED] := moose();

the left hand side is probably not a valid Perl 6 expression, yet
according to the current spec, it needs to be parsed implicitly as if a
:() is around it.

How does this work in practice? Is an infix macro allowed to change the
"is parsed" of its LHS? Should that trigger a reparse, or do we use
(potentially costly) prescanning?

A way out of this may be requiring :() on the LHS of :=, and treat it as
an infix macro that only changes how the RHS is parsed (which would be
trivial). Or, for symmetry, make := ordinary infix, and require both
side to be :() and \() respectively.

I agree that

    ($x, $y) := ($y, $x)

is clean (and featured in various places).  However, as long as there
are some Signature forms that isn't valid expression form, or would
triggered parse-time expression-form macros that wouldn't trigger in
Signature forms, I can't figure out how it would work.

The infix:<=> has no such problem because all valid lvalue expressions
are also valid rvalue expressions in Perl 6.

Thanks,
Audrey

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to