Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!uunet!stanford.edu!agate!ucbvax!CTC.CONTEL.COM!reid From: reid@CTC.CONTEL.COM (Tom Reid x4505) Newsgroups: comp.lang.modula2 Subject: Re: definition module loops Message-ID: <9105161749.AA06495@ctc.contel.com> Date: 16 May 91 17:49:59 GMT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: Modula2 List Organization: The Internet Lines: 25 = I would take Dr. Wirth's comment to mean that circular references cannot be = depended upon as a language feature in any given implementation of Modula-2. = It is just too bad that we language implementators have to deal with such = ambiguity in language definitions, especially since it is not a complicated = issue to define. Circular imports should be outlawed. = -- = George Thiruvathukal I wouldn't be so hasty. Mutual importation is not frequent but is still legitimate. For example, consider an object-oriented system in which classes are implemented by modules. It is perfectly legitimate for two classes to exchange messages and thus, do mutual importation. It is also legitimate for each module/class to initialize itself. However, it still does not seem practical for either one of the two module to reference the other during initialization (i.e., each create an instance of the other during initialization). Even that may be correct (actually, not lead to potential nondeterminism) if no reference uses information set at initialization. The bottom line is that one should not disparage a construct just because one does not see a use for it. This particular construct does lead to an insecurity, but Modula-2 (for all of its typechecking, et.al) has many others. Tom Reid (Reid@ctc.contel.com)