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

How about @?Int?

ex = :(
    macro _(ex)
        if $(rand() > 0.5)
            :(Union{$ex, Nothing})
        else
            :(Union{$ex, Missing})
        end
    end
)
ex.args[1].args[1] = :?
eval(ex)

@?Int
13 Likes