Are parameter names part of the function signature? A6 defines "siglets",
which don't appear to include parameter names.
If I write:
sub foo( Int $a, Int $b ) {...}
sub foo( Int $a, Int $c ) { print $a+$c }
Are these now equivalent:
foo( a => 1, b => 2 )
foo( a => 1, c => 3 )
What if I wrote:
sub bar( Int $a, Num $b ) {...}
sub bar( Int $b, Num $a ) { print $a - $b }
bar( a => 1, b => 3 )
Hopefully this is an error!
Can I discriminate on parameter names using multi subs?
multi sub alu( $num, $add is required_named) { print $num + $add}
multi sub alu( $num, $sub is required_named) { print $num - $sub }
alu( 5, add=>4 ); # prints "9"
alu( 5, sub=>4 ); # prints "1"
Dave.