* Ovid <publiustemp-perl...@yahoo.com> [2009-01-21 23:15]:
> Now that I think about it, the only reason we have this:
>
>  multisub skip(Str $reason);
>
> ... is because we want a default value of 1 for the number of
> tests to skip. Eliminate that default and the entire problem
> goes away. You must *always* specify the number of tests to
> skip. $reason is optional.
>
> Sound good?

Yes.

It might seem arguable whether requiring the programmer to numify
strings explicitly is such a burden – all it takes is a single
extra character:

    skip +"3", "3";

But the problem is then: what if they forget? Consider:

    skip "3";
    # vs
    skip +"3";

Woops.

So it’s fine to make all arguments optional (note: you don’t need
a multisub for this!), but their order MUST be fixed: if the
second parameter is there it’s always the description and if the
first is there it’s always the number of tests to skip.

So the `skip($desc)` variant must go. However, `skip()` can stay,
it doesn’t cause problems.

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>

Reply via email to