additional thanks :o)

On Tuesday, 25 February 2014 05:43:14 UTC-3, Fabian Gans wrote:
>
> Just a note, there is also the TypeCheck.jl package which has the function 
> check_method_calls that tests your code for possible no method errors. 
>
> I think this would be a good starting point towards an automatic 
> analysation tool, that checks which methods should be defined for a new 
> type which is a subtype of an existing type and to avoid no method errors. 
>
> Fabian
>
> On Monday, February 24, 2014 12:54:59 PM UTC+1, andrew cooke wrote:
>>
>> 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