> But recursion during load does not terminate? > > MODULE M0; > IMPORT M1, Out; > PROCEDURE Load*; END Load; > PROCEDURE Echo*; BEGIN Out.String("M0 echo"); Out.Ln END Echo; > BEGIN M1.Echo > END M0. > > MODULE M1; > IMPORT M0, Out; > PROCEDURE Echo*; BEGIN Out.String("M1 echo"); Out.Ln END Echo; > BEGIN M0.Echo > END M1. Since modules M0 and M1 can only be compiled using a tricky sequence of editing and compilation steps, isn’t an endless recursion in the loader a perfectly acceptable solution for such a pathological case? PS: There are at least two ways to avoid the endless recursion: 1. Catch the cyclic import during compilation. This would require modifying module ORB. It has been done before, not that hard. about 25-50 additional lines. 2. An iterative module loader. This too has been done. Just not in PO 2013.
participants (1)
-
Andreas Pirklbauer