<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Why? Because I view it is a desirable property if the compiler, if it encourages<br>
the programmer to write the import list of a module in the “right” order, i.e.<br>
reflecting the module hierarchy.. fully knowing that enforcing the rule that<br>
explicit imports must always become before re-imports may in some (rare?)<br>
cases force the programmer of a client module to change the import order,<br>
if the programmer of an imported module changes *its* import list.<br>
<br><br></blockquote><div><br></div>I have two problems in forcing the programmer to think about import ordering:<br>1. It does not scale. If you have big systems it is hard to hold in your head <br> all the import relationships. It is better to have the compiler figure it out<br> for you and do the proper checks.<br>2. It breaks encapsulation. If I (module B) import a module A, I should only care<br> about its public interface, not how it is implemented. So if the module A <br> re-imports types and indirectly could mess with the import order of my <br> module B, we have implementation details leaking through. So when the <br> implementation changes the import order of the client modules could break.<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
--<br>
<a href="mailto:Oberon@lists.inf.ethz.ch" target="_blank">Oberon@lists.inf.ethz.ch</a> mailing list for ETH Oberon and related systems<br>
<a href="https://lists.inf.ethz.ch/mailman/listinfo/oberon" rel="noreferrer" target="_blank">https://lists.inf.ethz.ch/mailman/listinfo/oberon</a><br>
</blockquote></div></div>