cognominal stef (>):
> Currently the Range creator method does not coerce its parameters.
> I think Range should be a role so as to impose some constraint.
> I think  Bool..2  should fail.

For what it's worth, I disagree. I think Bool..2 should be equivalent
to 0..2 (since Bool is a type object, which numifies to 0). Possibly
with a warning, since something undefined is being numified.

Patrick pointed out on #perl6 that infix:<..> cannot be meant to
numify by default, because then 'a'..'z' wouldn't work. But either of
these options would still be viable:

* If the rhs is Numeric, numify the lhs.
* If either the lhs or the rhs is Numeric, numify the other one.

I haven't come up with a use case to show that one of these options is
better than the other. The first is a bit reminiscent of
smartmatching; the second is more symmetric.

I don't think Range should be a role. I don't have any rational
argument, just the feeling that it's something of a premature type
restriction.

// Carl

Reply via email to