Another edge case: is it legal to have an optional Pair in the signature? That is:
sub foo($x, Pair ?$y, +$z){...}


If yes, what does this parse as:
        foo(10, z => 5);

If z => 5 is bound to $y, then $y is almost mandatory. ('almost' because we can still say foo(10); ). (and then can we also say foo(10, z => 5, z => 6)? :) That at least has the feature that it can be used to write bizarre code like C< sing :e:i:e:i:o > )

If it is bound to $z instead, how do we bind anything to $y positionally? Might as well change that to +$y.

It seems to me that an optional Pair is a catastrophe waiting to happen, and maybe it should just be illegal (or produce a warning at least)

Sorry if this has been gone over before...

--abhijit

Reply via email to