News for hackers. Stuff that matters.
Re:Why I’m Learning Perl 6 by kbenson on Wednesday July 26, 2017 @11:35AM (#14857095)
> So, how exactly these different ways of getting sub arguments are useful?

Because in the second (add2), you might do something interesting with the second (or third) arguments depending on the first. You might have optional arguments. Your arguments might be a list of items you don't know the size of. It allows you to develop what you need out of the extensible core mechanism. Modules can and have built on that.

> # There may be some other ways to extract arguments

There are. Now you can just do

    sub add( $arg1, $arg2 ) {
        $arg1 + $arg2;
    }
My personal favorite is to use Function::Parameters[1]

    fun add( Num $arg1, Num $arg2 ) {
        $arg1 + $arg2;
    }
which allows named params, type constraints (runtime), default params, etc.

1: https://metacpan.org/pod/Function::Parameters

Re:Why I’m Learning Perl 6 by dmytrish on Wednesday July 26, 2017 @11:41AM (#14857171)
I cannot imagine any way of practical (ab)using this flexibility that could not be covered in Python with its only way of handling arguments.