Simon Cozens wrote:

I was explaining why I think we ought to keep the parens. And that is
because, without them, we can't tell how many arguments to pass to
the method.
Not if it is specified that a block comes after the final
argument.
The only way that this could be specified is with a signature on the method.
Which is exactly the problem it outlined in my original answer.


And because the default ("pass all of 'em") isn't a good
enough answer.
So will we need parens around the arguments of the indirect object :
form?
In the same circumstances, yes.


Also, how is this different from the problems Perl 5 currently has - and
solves - in determining which arguments to pass?
Perl 5 doesn't have the problem. That's because Perl 5 totally ignores any
prototype you place on a method, and just passes every argument it can
find. Nor does it complain when that argument list doesn't match the
method's prototype.

But in Perl 6, the consistency between a method's parameter list and its
argument list *is* checked at run-time, so passing the wrong number of
arguments is (quite literally) fatal.

Damian

Reply via email to