On 2019-05-08 17:02:07 +0000, Adam D. Ruppe said:

Those are two *entirely different* functions, `a.otherFunc` and `myapp.otherFunc`.

That's what I expected...

Generally the answer here is "don't do that". Just have module a `import myapp` and then call otherFunc.

That's exactly what I want to avoid because "module a" is a generic one and shouldn't be touched to add any reference to user-specific code. In this case that would be the module name.

But if you must hack around it - and seriously ask yourself if this is good design before committing to it - you can slap `extern(C)` on the `otherFunc` declaraton and definition to force them to match up in the global namespace.

Thanks, I didn't thought that I need to go the C road for this.

--
Robert M. Münch
http://www.saphirion.com
smarter | better | faster

Reply via email to