I'm learning Julia, and I'm just a little bit confused about Types. Mine is a very basic question. I understand that if I write
x = 64.0::MyType
x should be contain the value 64, with Type equal to MyType. But if I write
x = 64.0::Float32
I get the error
ERROR: TypeError: in typeassert, expected Float32, got Float64
I found that the following does not give me an error
x = convert(Float32,64.0)
Is this the right approach? It seems too convoluted.