Using multiple dispatch and the type system correctly

Maybe this topic can be of interest: How to work with type unstable functions? I think it’s rather similar to what you are doing and it has some explanations.