Re: [julia-users] default type parameter?

2016-09-12 Thread Mauro
On Mon, 2016-09-12 at 16:07, Yichao Yu wrote: > On Mon, Sep 12, 2016 at 9:52 AM, Neal Becker wrote: > >> Taking the following example: >> >> type Point{T<:Real} >> x::T >> y::T >> end >> >> I can construct a Point taking the type "T"

Re: [julia-users] default type parameter?

2016-09-12 Thread Yichao Yu
On Mon, Sep 12, 2016 at 9:52 AM, Neal Becker wrote: > Taking the following example: > > type Point{T<:Real} > x::T > y::T > end > > I can construct a Point taking the type "T" from the argument types. > Or I can explicity specify the type > >

[julia-users] default type parameter?

2016-09-12 Thread Neal Becker
Taking the following example: type Point{T<:Real} x::T y::T end I can construct a Point taking the type "T" from the argument types. Or I can explicity specify the type Point{Int32}(2,2) But I'd like to be able to specify a default type: type Point{T<:Real=Int32} for