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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,5dba30d6260ef552,start X-Google-Attributes: gid103376,public From: "Wolf-Dieter Heker" Subject: Elaboration Order Date: 1999/11/15 Message-ID: #1/1 X-Deja-AN: 548774928 Sender: news@sd.aonix.com (USENET News Admin @flash) X-Nntp-Posting-Host: 192.157.139.120 Organization: Aonix, San Diego, CA, USA X-Msmail-Priority: Normal X-Priority: 3 Newsgroups: comp.lang.ada X-Mimeole: Produced By Microsoft MimeOLE V5.00.2014.211 Date: 1999-11-15T00:00:00+00:00 List-Id: I think that Ada95 leaves too much freedom with respect to the elaborations order of library units unless the user specifies lots of pragmas. This was already the case in Ada83, although the introduction of elaborate_body slightly improved the situation. >From my point of view, most of the library packages ever written are 'simple ones', i.e. they need no special treatment with respect to elaboration order. Hence I would suggest that these packages should contain an elaborate_body pragma (except, of course, if the have no body). But alas, most programmers - including myself ;-) - do not write these pragmas until the get into trouble. The lack of these pragmas is a portability issue. And isn't it true that if a package body cannnot be elaborated immediately after the spec we have generally a doubtful design? (This is not to say there might be no reasons for such a structure, just that it would be more the exception rathern than the rule.) Now my major question: Why didn't the language designers choose an approach that would make the standard case easy and provide a pragma defer_elaboration_of_body for those rare cases, where the user doesn't want the body elaborated immediately after the spec? Is there more reason that just compatibility with the user unfriendly definition of Ada83? Wolf-Dieter Heker