Why type instability?

If you only care about type stability of the returned value (not of internal variables) there is @inferred, from Base.Test module:

julia> Test.@inferred 1 + 5
6

julia> Test.@inferred rand(["a", 1, 5.0])
ERROR: return type Float64 does not match inferred return type Any
Stacktrace:
 [1] error(::String) at ./error.jl:21