On 10/18/05, Eric <[EMAIL PROTECTED]> wrote: > Currently we (can|will be able to) do > > "string".trans( (['h','e'] => "0") ); > "string".trans( <== ['h','e'] => "0"); > > Those are fine and i can live with that, but it seems that if we made the > signature of trans > > method trans(Str $self: [EMAIL PROTECTED]) {}; > > Then we could just do plain old: > "string".trans(['h','e'] => "0"); > > Which to me seems a lot easier to read. I would propose that it only effects > named params so that there is no concern about pairs in values and how to > handle them.
Uh, no. Certainly not for a method. For a bare sub that has been predeclared it may be possible. But we don't want to remagicalize pairs after we just argued the heck out of it to make pairs *always* be named parameters. The way I'd do the interface is like this: "string".trans([ <h e> => "0", ]); It looks nicer if you use the indirect object form: trans "string": [ <h e> => "0", ]; Luke