[Oberon] Module aliases - what is the correct way to handle them
Paul Reed
paulreed at paddedcell.com
Sun Feb 16 12:06:54 CET 2020
Hi Jörg,
> IMPORT Y := M0, M0;
> Why should this be forbidden?
> In Oberon it‘s absolutely fine to have the same object visible under
> different names...
Thanks, I see what you mean. But now I'm thinking: extending your
argument, would it not then also be valid to have the same module
available under multiple aliases, not just one, e.g.
IMPORT Y := M0, M0, X := M0;
So we need clear and hopefully simple code which prevents an import
twice, by checking canonical (org-)names, but then checks for
inadvertent multiple definitions of aliases - where a non-aliased module
has its canonical name as its alias. Or maybe the other way around.
Yikes. I get it now - hmm. Thanks again!
Cheers,
Paul
More information about the Oberon
mailing list