Working on the finite field code I found myself asking "what is a Number?".

One answer is:

julia> Base.subtypetree(Number)
(Number,{(Complex{Float16},{}),(Complex{Float32},{}),(Complex{Float64},{}),(
Complex{T<:Real},{}),(Real,{(FloatingPoint,{(BigFloat,{}),(Float16,{}),(
Float32,{}),(Float64,{})}),(Integer,{(BigInt,{}),(Bool,{}),(Char,{}),(Signed
,{(Int128,{}),(Int16,{}),(Int32,{}),(Int64,{}),(Int8,{})}),(Unsigned,{(
Uint128,{}),(Uint16,{}),(Uint32,{}),(Uint64,{}),(Uint8,{})})}),(MathConst{
sym},{}),(Rational{T<:Integer},{})})})

but that doesn't help so much.  What I really wanted to know is - what 
methods are assumed to exist for something that is a subtype of Number?

And I don't know how to answer that.

Maybe (I don't think so) Julia needs some kind of concept like abstract 
methods, where you can name methods for Number that any subtype must 
implement?

Maybe there needs to be some kind of tool that introspects the code base 
and says "90% of subtypes define real and abs"?

Maybe this has already been discussed or is clearly not an issue?

Andrew

Reply via email to