[Oberon] Should hidden re-imports be able to coexist with identifiers
luke.boasso at gmail.com
Sun May 16 03:13:24 CEST 2021
Why? Because I view it is a desirable property if the compiler, if it
> the programmer to write the import list of a module in the “right” order,
> reflecting the module hierarchy.. fully knowing that enforcing the rule
> explicit imports must always become before re-imports may in some (rare?)
> cases force the programmer of a client module to change the import order,
> if the programmer of an imported module changes *its* import list.
I have two problems in forcing the programmer to think about import
1. It does not scale. If you have big systems it is hard to hold in your
all the import relationships. It is better to have the compiler figure
for you and do the proper checks.
2. It breaks encapsulation. If I (module B) import a module A, I should
about its public interface, not how it is implemented. So if the module
re-imports types and indirectly could mess with the import order of my
module B, we have implementation details leaking through. So when the
implementation changes the import order of the client modules could
> Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Oberon