On Wednesday, November 26, 2014 11:41:09 PM UTC+7, Nils Gudat wrote:
An example:
>
> function f{T<:Float64}(x1::T, x2::T, x3::Array) will give me "Error:
> Float64 is a leaf type. As a type constraint it makes no sense in
> T<:Float64". I thought this was a way of efficiently expressing that both
> x1 and x2 should be of type Float64, but apparently that's not a great idea?
>
yes, you could have just written
function f( x1::Float64, x2::Float64, x3::Array )
Float64 is concrete type, so you don't need curly to express that.