On Thu, Jun 26, 2008 at 04:50:21PM +0200, Moritz Lenz wrote:
> What's the alternative?
> I don't think it's a good idea to special-case numeric types, and I
> don't think it's a good idea to define multis for each numeric type either.
> I assume that 'Num' is meant to be a non-complex.
> Then it seems to make sense to assume:
> Int is Rat
> Rat is Num
> Num is Complex
> or am I off again?

Yeah, that looks sane.  I should probably put Int under Rat in p6types,
and maybe Num under Complex.

I believe an implementation can choose to do the inheritance either way:

Rat is Num
Rat is Any does Num

Since both of those end up looking the same to the user, more or less.
I tended to use the first form in p6types.

> Anyway, for our work in the test suite it would be nice to have it
> specced somewhere. Or should I rely on Ryan's docs/p6types? If so, it
> would be nice to convert it to format that can smartlinked to.

Since it's unofficial and (in theory) just repeats what's in the
synopses I don't think tests should refer to it.  Or someone could make
an S30 (Standard perl library) out of it.


Reply via email to