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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b1264e586250f470 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-07-10 08:03:15 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: dlwester@hotmail.com (Don Westermeyer) Newsgroups: comp.lang.ada Subject: Re: Elaboration of nested generic package. Date: 10 Jul 2003 08:03:14 -0700 Organization: http://groups.google.com/ Message-ID: <5437fafb.0307100703.16291e68@posting.google.com> References: <5437fafb.0307071905.5d3bbc4e@posting.google.com> <1ec946d1.0307080946.7e61cda9@posting.google.com> <5437fafb.0307091710.5cb4b0eb@posting.google.com> <3F0CC2D1.10904@attbi.com> NNTP-Posting-Host: 205.175.225.24 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1057849395 8785 127.0.0.1 (10 Jul 2003 15:03:15 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 10 Jul 2003 15:03:15 GMT Xref: archiver1.google.com comp.lang.ada:40168 Date: 2003-07-10T15:03:15+00:00 List-Id: "Robert I. Eachus" wrote in message news:<3F0CC2D1.10904@attbi.com>... > >> > But in general, if the compiler can't figure it out, the programmer is > very unlikely to have a decent answer in mind. > Well, some compilers do better at this than others, and in the case of one compiler I've worked it apparently just picks a fairly random order in which to elaborate things. The elaborate pragmas pretty much guarantee elaboration dependancy problems are caught at compile/link time vs. execution (where on target hardware the debugging can be quite difficult - especially exceptions during elaboration). Another problem is when using packages written by others you may not know if it needs to be elaborated or not. For instance by just simply declaring a variable one can set off a complex series of program statements. Seems to me that it is always safer to use the pragmas. As long as circular dependancies are avoided the compile will have no difficulty with this. At least Ada provides decent error checking for elaboration issues. Other languages (like Borland Delphi for instance) will just let you hang yourself if you get too fancy during elaboration.