Paraphrasing Piers Cawley talking about why to give up Ruby for Perl (paraphrased):
This is assembly language for calling a function:
push address of RETURN on stack
push $argument on stack
get address of FUNC
goto FUNC
RETURN:
pop return value off of stack
This is Perl 5 for calling a function:
func($argument);
That's all well and good. This is assembly language for entering a function:
pop parameter from stack
verify parameter type constraints
...
This is Perl 5 for entering a function:
sub func
{
my $parameter = shift;
die 'Wrong type' unless $parameter->isa( 'Whatever' );
...
}
... but wouldn't it be nice if:
sub func(Whatever $parameter) { ... }
(No new insight here, but directly prior to this talk, Damian Conway and I talked about how Perl 6 signatures simplify much, much more code than this simple example illustrates. Lots of code goes away.
Aye. I make the same point in a Perl 6 advent blog post about parameters in Perl 6.
My example is slightly longer, but it too probably understates how much boilerplate code, and mental effort, is saved by not doing parameter handling manually.