On 4/19/04 7:16 PM, Larry Wall wrote: > Well, no, we're still stuck at run-time validation of that. In the caseof methods you can't really do anything else anyway, generally speaking.
Why is that?
Because at compile time all you have is a generic thing, a (possibly indirectly accessed) method name, and a list of parameters. There's no good way to tell which method will ultimately be called, and validating against all declared methods of that name won't get you anything useful there since the result's likely going to be pretty contradictory.
> since we've told the Parrot people they don't have to worry aboutanything but positional parameters for 6.0.0.
Can we do some magic behind the scenes that will make "required named params" look positional to parrot?
Maybe. There are issues of indirect named parameters (where you pass in a scalar ref to a pair, which if I've read properly should be treated as a named parameter) though we could have the compiler shift 'em all to the end.
The problem there is that positional parameters have to maintain their position of the destination sub has no names--we can't go reordering things for subs that do the traditional:
sub foo { my ($bar, $baz, $plugh) = @_; }
in that case the positional parameters need to stay where they are. They also can't move if the destination sub or method doesn't do named parameters (because either it doesn't or it's not perl 6) since in that case the named parameters need to degrade nicely (and in place) to their values.
--
Dan
--------------------------------------"it's like this"------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk