<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="" style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);">Hi Luca,</div><div class="" style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);"><br class=""></div><div class="" style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);">You are about half way through in convincing me.. ;-) </div><div class="" style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);"><br class=""></div><div class="" style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);"><div class="" style="margin: 0px; line-height: normal;"><div class="" style="margin: 0px; line-height: normal;"><div class="" style="margin: 0px; line-height: normal;"><div class="" style="margin: 0px; line-height: normal;">.. and now that there is an easy way (i.e. 5 lines of code) to get</div><div class="" style="margin: 0px; line-height: normal;">rid of the “invalid import order” restriction also in the PO 2013</div><div class="" style="margin: 0px; line-height: normal;">compiler (i.e. without having to make more elaborate changes</div><div class="" style="margin: 0px; line-height: normal;">as in oberonc/Griesemer’s approach), it’s tempting indeed.</div></div></div><div class="" style="margin: 0px; line-height: normal;"></div></div></div><div class="" style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);"><div class="" style="margin: 0px; line-height: normal;"><div class="" style="margin: 0px; line-height: normal;"><div class="" style="margin: 0px; line-height: normal;"><br class=""></div></div></div></div><div class="" style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);">  > 2. It breaks encapsulation. If I (module B) import a module,</div><div class="" style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);">  >    A, I should only care about its public interface, not how it</div><div class="" style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);">  >    is implemented. So if the module A re-imports types and</div><div class="" style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);">  >    indirectly could mess with the import order of my module B,</div><div class="" style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);">  >    we have implementation details leaking through. So when</div><div class="" style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);">  >    the implementation changes the import order of the client</div><div class="" style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);">  >    modules could break.</div><div class="" style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);"><br class=""></div><div class="" style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);"><div class="" style="margin: 0px; line-height: normal;">That is a strong argument indeed!</div><div class="" style="margin: 0px; line-height: normal;"><br class=""></div><div class="" style="margin: 0px; line-height: normal;">In essence, what you’re saying is that the very postulate</div><div class="" style="margin: 0px; line-height: normal;">of “modular programming” itself is violated here (namely that</div><div class="" style="margin: 0px; line-height: normal;">changes in the implementation of A should not necessitate</div><div class="" style="margin: 0px; line-height: normal;">the recompilation - or in this case even the re-editing (!)</div><div class="" style="margin: 0px; line-height: normal;">of the import list - of a client module B) .</div><div class="" style="margin: 0px; line-height: normal;"><br class=""></div><div class="" style="margin: 0px; line-height: normal;"><div class="" style="margin: 0px; line-height: normal;">Although one can also view the re-exported types of A</div><div class="" style="margin: 0px; line-height: normal;">as *part* of its interface, in the sense that if A is modified</div><div class="" style="margin: 0px; line-height: normal;">such that it now also re-exports types from another module</div><div class="" style="margin: 0px; line-height: normal;">(that it previously didn’t re-export), the “interface” of A *does* </div><div class="" style="margin: 0px; line-height: normal;">actually change - surely the symbol file of A does. Thus,</div><div class="" style="margin: 0px; line-height: normal;">a client B must - at the minimum - be recompiled anyway.</div><div class="" style="margin: 0px; line-height: normal;"><br class=""></div><div class="" style="margin: 0px; line-height: normal;">It just happens not to be the “public” part of A's interface that</div><div class="" style="margin: 0px; line-height: normal;">changes, but only the “hidden” part (=list of re-exported types).</div><div class="" style="margin: 0px; line-height: normal;"><br class=""></div><div class="" style="margin: 0px; line-height: normal;">So.in principle, this should not be great cause for great concern,</div><div class="" style="margin: 0px; line-height: normal;">weren’t it for the fact that (the import list of) module B may</div><div class="" style="margin: 0px; line-height: normal;">now also have to be edited (!) before it can be re-compiled.</div><div class="" style="margin: 0px; line-height: normal;"><br class=""></div><div class="" style="margin: 0px; line-height: normal;">* * *</div><div class="" style="margin: 0px; line-height: normal;"><br class=""></div><div class="" style="margin: 0px; line-height: normal;">The crux is:</div><div class="" style="margin: 0px; line-height: normal;"><br class=""></div><div class="" style="margin: 0px; line-height: normal;">It’s the fact that the re-import mechanism is a *hidden* mechanism</div><div class="" style="margin: 0px; line-height: normal;">(i.e. not in the spirit of Oberon) that causes much of the issue.</div><div class="" style="margin: 0px; line-height: normal;"><br class=""></div></div></div><div class="" style="margin: 0px; line-height: normal; color: rgb(69, 69, 69);"><div class="" style="margin: 0px; line-height: normal;">PS: I have experimented with - and even implemented - a few</div><div class="" style="margin: 0px; line-height: normal;">possible ways to try to solve the root cause of the issue instead</div><div class="" style="margin: 0px; line-height: normal;">of tinkering with its symptoms, i.e. to get rid of the re-import</div><div class="" style="margin: 0px; line-height: normal;">mechanism altogether.. e.g. by explicitly marking re-exported</div><div class="" style="margin: 0px; line-height: normal;">types in the source file or something..</div><div class="" style="margin: 0px; line-height: normal;"><br class=""></div><div class="" style="margin: 0px; line-height: normal;">..but I just couldn’t do it  (at least not in a satisfactory manner). </div><div class="" style="margin: 0px; line-height: normal;"><br class=""></div><div class="" style="margin: 0px; line-height: normal;">-ap</div></div></body></html>