Differences between mutliple functions and function with multiple methods

If I understand you correctly, you have some distinct structs and some sets of methods, one method set for each struct type.

struct StructA
   value::Int32
end

struct StructB
  value::Float64
end

function f1_a(x::StructA) ...
function f1_b(x::StructB) ...
function f2_a(x::StructA) ...
function f2_b(x::StructB) ...

that will work without any ifelse-ing

1 Like