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,7a4380ff535aa24d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-11-30 15:05:50 PST Path: bga.com!news.sprintlink.net!howland.reston.ans.net!swrinde!ihnp4.ucsd.edu!network.ucsd.edu!mbk From: mbk@inls1.ucsd.edu (Matt Kennel) Newsgroups: comp.lang.ada Subject: Re: cross linking packages Date: 30 Nov 1994 23:03:23 GMT Organization: Institute For Nonlinear Science, UCSD Message-ID: <3bj0br$mri@network.ucsd.edu> References: <3bg8mp$i0g@gnat.cs.nyu.edu> NNTP-Posting-Host: lyapunov.ucsd.edu X-Newsreader: TIN [version 1.1 PL8] Date: 1994-11-30T23:03:23+00:00 List-Id: Robert Dewar (dewar@cs.nyu.edu) wrote: : "The GNAT compiler stumbles into a circular ..." : How about instead : "The GNAT compiler correctly diagnoses an illegal circular dependency" : This is definitely wrong, you have to put both types in the same : package if they have this sort of mutual dependence. : (and now we can rerun the long dialog on mutually recursive types :-) Can somebody answer this question: Why were cyclical dependencies among types defined illegal? (I.e. type A defines features that use type B, and type B defines features that use type A.) After all in a statically typed langauge like Ada, all variables must be bound to types statically at compile time, so there should be no ambiguity in "elaboration order" as there is no run-time execution that must take place to bind variables to types. It apparently works fine when they are in the same package. Thus supposing you put two types each in their own package, both inside an outer package. Do the mutual dependencies now work fine because they are both inside one package, the outer one? -- -Matt Kennel mbk@inls1.ucsd.edu -Institute for Nonlinear Science, University of California, San Diego -*** AD: Archive for nonlinear dynamics papers & programs: FTP to -*** lyapunov.ucsd.edu, username "anonymous".