Autoresolve function(x::module.struct)

I just encountered a situation where two packages exported the same function ulp, one not in Base (not yet). Each package dispatches ulp over its own package-realized and exported struct type. There is never any real unclarity about which of the two module.ulp(x::module.struct) is appropriate. It seems that this could be automatically resolve. Any need that might arise to use the other module’s ulp with the former module’s struct would be exceptional and the client would be required to do the same as must be done now, qualify it.

I think you are referring to this Function name conflict: ADL / function merging?.

1 Like

Just the use when an exporting module exports both a function (not in Base) and a struct and that function is to dispatch on that exported struct … that is all it does in module 1. In module 2 there is a different struct (with a different name) and the same the function, there defined to dispatch on module 2’s exported struct and that’s all it does in module 2. I am not suggesting generality, rather simplicity when it will hold harmless.

1 Like