From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,93fa00d728cc528e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-10-28 09:09:38 PST Path: nntp.gmd.de!xlink.net!sol.ctr.columbia.edu!howland.reston.ans.net!pipex!oleane!jussieu.fr!univ-lyon1.fr!swidir.switch.ch!epflnews!dinews.epfl.ch!di.epfl.ch!Robb.Nebbe From: Robb.Nebbe@di.epfl.ch (Robb Nebbe) Newsgroups: comp.lang.ada Subject: Re: SOLVED! Decoupled Mutual Recursion Challenger Date: 28 Oct 1994 15:04:20 GMT Organization: Ecole Polytechnique Federale de Lausanne Sender: nebbe@lglsun3.epfl.ch (Robb Nebbe) Distribution: world Message-ID: <1994Oct28.143557@di.epfl.ch> References: <38hcv3$j85@baleen.cs.ucla.edu> <38i65r$li2@network.ucsd.edu> <1994Oct25.164314.28453@swlvx2.msd.ray.com> <783257151snx@brewster.demon.co.uk> NNTP-Posting-Host: lglsun3.epfl.ch Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Date: 1994-10-28T15:04:20+00:00 List-Id: |> What happens with mutually recursive procedures in Ada then? The above |> statement would seem to preclude the possibility if Ada is so consistent. |> If I've got hold of the wrong end of the stick then please tell me. |> There is a problem if you try to inline two mutually recursive procedures; it is impossible and one of the procedure will not be inlined. Normally procedures have a level of indirection, the procedure call, which avoids any problems with mutual recursion. Types on the other hand do not have an implicit level of indirection in Ada (they normally do in Eiffel which is how Eiffel sidesteps the whole issue). If you want mutually recursive types you must use an explicit level of indirection. The trick was separating this over multiple packages which is difficult because of Ada's tight control over visibility. There are better solutions that avoid the whole issue in both Eiffel and Ada. - Robb Nebbe