This is an issue that was already discussed before, in terms of the SharedFunctions
discussion
A different generic function with the same name is a function with the same name as another function… For example:
module A f(x) = x end module B f(x, y) = x + y end
Here
A.f
andB.f
are different (generic) functions.The reason why we cannot just merge the two
f
is because of how you write generic code.
How about this rule to solve this: Only import a name from a SharedFunctions package if you don’t intend to write generic method with only the Any type dispatch; otherwise have the generic definitions in SharedFunctions Shared function names with completely generic method definitions should either have the generic definitions in the SharedFunctions package not be imported from SharedFunctions This way, if there is a need for generic methods, the fully generic method is either shared by al…
In theory we could almost make it automatic, right? That is, have a github bot that generates a PR that extracts all exported function names, abstract types and abstract docstrings into an abstract header package, and rewires the old package to require and import and extend and reexport functions from the abstract header package. In theory, the creation of lightweight AbstractFoo / HeaderFoo packages from some Foo package should not requite a lot of human thought or intervention (corner case: …