[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Proposed numeric type hierarchy




James Knight writes:
>
> 
> ---- type hierarchy ----
> 
> ;; I hope this is the right use of the term 'scalar'
> (dc <scalar> (<any>))

Unfortunately, it's not. Scalars are real values, which means that
complex isn't an appropriate subclass for them.
 

> Comments?

It strikes me that parameterized classes might be the best way of
representing dimensioned types. If you've got a numeric hierarchy of
N classes, and M types for dimensions, any of the M x N possible
classes are credible, eg (of <meter> <int>) or (of <meter> <flo>).

I dunno what the implications of this are, since it just hit me
as a possibility.

-- 
Neel Krishnaswami
neelk@alum.mit.edu