Recommended style for conversion vs. constructors in v0.7

Yes, you should make them constructors. In the case of Number types, convert definitions are not usually necessary since this method exists:

convert(::Type{T}, x::Number) where {T<:Number} = T(x)

Constructors are considered the lowest-level way to make an instance of something, so all new types should have them. Then convert definitions are inherited or added on top as needed.

3 Likes