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, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,28b389d4503cb555 X-Google-Attributes: gid103376,public From: Robert Dewar Subject: Re: generic package dilemma Date: 1999/11/22 Message-ID: <81bqg4$55t$1@nnrp1.deja.com>#1/1 X-Deja-AN: 551649016 References: <80u48b$ghr$1@bunyip.cc.uq.edu.au> <3832e27f_1@news1.prserv.net> <3832E75D.5B1BA719@mail.com> <383319e8_4@news1.prserv.net> <3833F615.5AD7166C@mail.com> <383442e1_1@news1.prserv.net> <383510EA.9DFEE8B6@mail.com> <383569db_2@news1.prserv.net> <81449o$1fh$1@nnrp1.deja.com> <3835CF6B.C78469E@mitre.org> X-Http-Proxy: 1.0 x43.deja.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Mon Nov 22 16:20:27 1999 GMT X-MyDeja-Info: XMYDJUIDrobert_dewar Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.04 [en] (OS/2; I) Date: 1999-11-22T00:00:00+00:00 List-Id: In article <3835CF6B.C78469E@mitre.org>, "Robert I. Eachus" wrote: > Robert Dewar wrote: > There are very special cases where you should use Elaborate instead of Elaborate_All, and I occasionally run into them when creating mutually recursive types. Whenever you use Elaborate instead of Elaborate_All, you are counting on (illicit) knowledge of what is in the package body. The above statement is equivalent to a special case of: "there are very special cases where the client must know details of the coding in the package body, ...." Perhaps, but this is always undesirable, so if you can find another way of solving the problem you should. In all our experience with (millions and millions of lines) of Ada code, the only legitimate case for using Elaborate that has cropped up is when compiling old legacy Ada 83 code. Note that in default mode, GNAT supplies the recommended Elaborate_All pragmas implicitly, and it is very rare that new Ada 95 code runs into trouble with this rule (the most common case is where tasks are started at elaboration time). In no cases has the solution been to use pragma Elaborate. The reason that Robert Dewar strongly argued to keep Elaborate in the language as a first class citizen was a) one can construct cases in which it is the only way of doing things, so from a formal point of view, eliminating it would subset the language. b) more pragmatically, people HAVE constructed such cases pretty frequently, usually by accident, in Ada 83 legacy code :-) Sent via Deja.com http://www.deja.com/ Before you buy.