Hmm, if we take + away from named, it can become the "required" marker,
so
sub foo ($a,$b,?$c)
is really short for
sub foo (+$a,+$b,?$c)
and required named parameters then become
sub bar (+:$key)
And, of course, that means that
sub baz (+?$key)
is a required optional parameter. :-)
Actually, that's an argument that : is in a different class than the regex
quantifiers, and required named should be
sub bar (+$:key)
as I speculated earlier. Maybe we just force that to bind to $key instead
of $:key. That screws up the
submethod BUILD ($.attribute)
syntax though, unless we say that any twigil forces named argument passing,
or otherwise just force it to work. Though with BUILD we've basically
said already that all arguments must be passed +$: (required name) form.
Maybe it can be made to work.
Larry