From: Leopold Toetsch <[EMAIL PROTECTED]>
Date: Fri, 24 Jun 2005 15:29:18 +0200
Chip Salzenberg wrote:
> On Fri, Jun 24, 2005 at 08:21:25AM +0200, Leopold Toetsch wrote:
>
>>The plan is to move these methods to classes/scalar.pmc
>
> Last I remember, I asked for a number.pmc for Integer and Float to
> derive from. A Number isa Scalar. Is there some problem with Number?
I must have missed the Number PMC. Anyway: there are two possibiities:
a) Number is a concrete type then inheritance works out of the box.
b) Number is an abstract type (i.e. number) then the problem still exists.
Since Complex could also be considered a Number, but of a very different
sort, it might be worth constructing the type hierarchy to reflect this:
Scalar
Number
Real
Integer
Float
Complex
In this view, Number is necessarily abstract. I imagine Python also
does something like this?
The former has a vtable, type number, class name. The abstract number
has nothing, it's just used for inheriting vtable functionality.
leo
And methods?
-- Bob Rogers
http://rgrjr.dyndns.org/