* Michael G Schwern <[EMAIL PROTECTED]> [2006-07-19 02:10]: > On 7/17/06, A. Pagaltzis <[EMAIL PROTECTED]> wrote: > >Had they been named parameters, we wouldn't be having this > >discussion. > > is got => 'foo', expected => 'bar', description => 'foo is bar'; > > is 'foo', 'bar', 'foo is bar'; > > When you plan to use a function thousands of times, brevity is > nice. Same reason its "ok" and "is" and not "assert" and > "assert_eq_string".
I know. That’s why I said it would have been nice if the interface had been planned out that way from the start. Then I’d cast your example like so: is 'foo', 'bar', msg => 'foo is bar'; The extra `msg =>` is not too painful, I think, and it would allow things like `skip` which are relatively uncommon to then work thusly: skip n => 2, msg => "Don't feel like it today"; There’s no way to mix up the parameters with that interface. Ambiguities could easily be avoided for things like `can_ok` which can take lists for one “logical parameter” by always taking them as an arrayref. It’s nosier than the current interface, but just slightly, and it would make the API a lot more regular. But we don’t get to fix it now; hopefully for Perl 6. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/>