Dynamically add module functions in __using__ macro

@kip Awesome, using defdelegate achieves the effect that I wanted! I’ve come across defdelegate before, but it didn’t occur to me that it would work just fine with defoverridable. Now it makes sense.

You were right in your previous post — I oversimplified my use case just for convenience. Ultimately I was wondering if this could work on multiple levels, e.g.

module A do
  # has function foo(), exports it in __using__
end

module B do
  use A
  # has function bar, overwrites foo, exports all in __using__
end

module C do
  use B
  # has bar() and B's version of foo()
end

If module D comes around and wants to inherit/extend module C, it doesn’t need to know about A or B at all. This approach tightly couples all the modules, but could be useful in some cases where it can be tolerated.

Thanks a lot for your help!