# Autoresolve function(x::module.struct)

**URL:** https://discourse.julialang.org/t/autoresolve-function-x-module-struct/17759
**Category:** Internals & Design
**Created:** [November 20, 2018, 6:15am UTC](https://discourse.julialang.org/t/autoresolve-function-x-module-struct/17759 "2018-11-20T06:15:38Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![JeffreySarnoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jeffreysarnoff/32/1980_2.png) [@JeffreySarnoff](https://discourse.julialang.org/u/JeffreySarnoff)
#### Post date: [November 20, 2018, 6:15am UTC](https://discourse.julialang.org/t/autoresolve-function-x-module-struct/17759/1 "2018-11-20T06:15:38Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![mauro3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mauro3/32/292_2.png) [@mauro3](https://discourse.julialang.org/u/mauro3)
#### Post date: [November 20, 2018, 8:35am UTC](https://discourse.julialang.org/t/autoresolve-function-x-module-struct/17759/2 "2018-11-20T08:35:34Z")

</div>

I think you are referring to this [Function name conflict: ADL / function merging?](https://discourse.julialang.org/t/function-name-conflict-adl-function-merging/10335).

---

<div class="post-metadata">

### Author: ![JeffreySarnoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jeffreysarnoff/32/1980_2.png) [@JeffreySarnoff](https://discourse.julialang.org/u/JeffreySarnoff)
#### Post date: [November 20, 2018, 8:48am UTC](https://discourse.julialang.org/t/autoresolve-function-x-module-struct/17759/3 "2018-11-20T08:48:05Z")

</div>

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.
