Hi guys,
So, I recently revisited Julia and fooled around a bit with Julia Box.
Amazing - this looks like the language I never actually dared dreaming of
;) Keep up the greedy work!
That being said, my question might be dumb, but I am struggling with the
type system of Julia. I want to guarantee that the arguments to a function
are numerical arrays of dimension 1 - how would I best do that in Julia?
The problem is that
Array{Number, 1}
exists as a type, but when I get the type system right it should not have
any subtypes except union. Especially
Array{Float64, 1} <: Array{Number, 1}
evaluates to ' false'. I think I get why this is implemented the way it is,
however, would it not be most intuitive to have something like
function f(x::Array{Number, 1})
x
end
What would be the 'Julian' way of doing this?
Best,
Kevin