For example,

function f(x::Int; y::Union{Void, Dict})
    z = y == nothing ? Dict() : y
    ...
end


Or

function f(x::Int; y::Dict=Dict())
    ...
end

Which one should I use?

Reply via email to