On Mon, Mar 14, 2005 at 01:07:45AM -0600, Rod Adams wrote: : It's been defined that Perl 6.0.0 does not dispatch on named parameters, : for better or for worse. If you don't like it, talk to Larry.
That's a little bit of an overstatement. I've only said 6.0.0 doesn't *have* to support MMD on named parameters. I haven't said it mustn't. If the first implementation of Perl 6 figures out a decent way to handle it efficiently, I'm all for it, provided it doesn't unduly delay 6.0.0. At the time we made the decision, it wasn't clear to any of us in the room how to do it efficiently, but it might be obvious to someone else. Or maybe it's even okay to take a speed hit, as long as we don't punish the innocent with the guilty. And the long and the short of it is that it really depends on whether someone is willing to work on implementing it. We hope to get there someday, but it's not top priority for 6.0.0 unless someone decides to make it top priority. There are a number of things we might negotiate away to make it easier to get 6.0.0 out the door quicker, and this is only one of them. My only stipulation is that we trim things in such a way as to not make them impossible later. Which means, in the case of named MMD, that it is required that you use a colon to separate positional arguments from named arguments until named MMD is implemented, because we don't want the meaning of signatures to suddenly change. After named MMD is implemented we can remove the colon. There are really two different problems here--it's also an issue that you can use named notation on position args. and I don't have as good an idea for how to future proof against that changing its meaning, other than telling people not to do it yet. *If* all the long names for a particular short name use the same parameter naming scheme, then we could probably do some kind of global optimization to know that a particular named parameter always maps to a particular position. But that's a big if. It's certainly possible that the best way to future proof it is to simply do it right in the first place, even if it's slow to begin with. People can always write the positional form for speed when they need it. Larry