Darren Duncan wrote:
 > Or actually, there is just one main thing I want to know right now ...
> You have roles that look like they're supposed to match one specific class 
> each 
> in particular, such as Boolean for Bool, Integral for Int, etc, ostensibly in 
> case users want to declare their own classes like them.

That's not the complete picture; There are usually more classes that
implement such a role, but they are not listed in S02, only in S09 (iirc).

> So, would Int actually have any of its own methods, or would they *all* be 
> provided by Integral?  Likewise with Bool and Boolean?  And so on.

I guess that there will be methods that are only stubbed in the roles
(the low-level ones) and need to be overridden in all classes that
implement the methods. In this case the roles are used like interfaces
in Java.

Other, higher-level methods can implemented in the roles directly, as
long as they don't have to know about the storage of the actua numeric

I can't think of a method in Int that's not defined in the Integral
role, so I can't give you a definitive answer to the question, but I
guess the answer is "no" for the more common core numeric types.

Moritz Lenz
http://perlgeek.de/ |  http://perl-6.de/ | http://sudokugarden.de/

Reply via email to