Proposal for SharedFunctions.jl package for optional dependency management

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

  1. have the generic definitions in the SharedFunctions package
  2. not be imported from SharedFunctions

This way, if there is a need for generic methods, the fully generic method is either shared by all who import SharedFunctions or the entire method name needs a new namespace, in case of a “generic method conflict.”

This also makes it easy, if you later decide to add a generic method, you can either drop the import statement (and define locally) or contribute the generic definition to SharedFunctions.