in reply to (Perl6) Signatures

:prop("cricket bat") :number<5> and prop => "cricket bat" , number => 5 are equivalent, yes.

> :prop("cricket bat") === prop => "cricket bat" True
But it doesn't work for the alias syntax because that syntax for creating an alias and not the pair constructor. They just look similar.

sub doctor(:$prop($internal) ) { This is incorrect syntax. It should be: sub doctor(:prop(:$internal) ) { Please note the lack of $, which makes it just an alias, not a Pair.

So, regarding mandatory parameters, neither of your examples will work: sub doctor(:$prop($internal)! ) { sub doctor(:$prop!($internal) ) { You need: sub doctor(:prop($internal)! ) { or sub doctor(:$prop(:$internal)! ) {

> But named arguments are by default optional, why not the same trick?

It's all about what looks better. According to TimToady. There's no real answer to this question. In this case he is copying how it works in the Unix command line.

> %%

Means "divisible by". It's true when the left argument is divisible by the right one. False otherwise. sub { $_ % 2 } is the opposite, and is numeric instead of boolean like the other one.

$a %% $b is more like !($a % $b). Note the cast to Boolean and the logical negation.