Aliases for Union{T, Nothing} and Union{T, Missing}?

Given that the API of some functions in Julia now gives nothing if no sensible output exist, i.e.

julia> tryparse(Float64, "a")

julia> findfirst(==(3), [1, 2])

there was a proposal to create a few ? based syntactic sugar to work with nothing https://github.com/JuliaLang/julia/issues/26303.

If that happens, then the T? notation would be more consistent for nothing than missing.

1 Like