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,LOTS_OF_MONEY autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4c459ff0adb576bc X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-02-05 19:01:09 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fu-berlin.de!uni-berlin.de!ppp-3-147.5800-9.telinco.NET!not-for-mail From: "Nick Roberts" Newsgroups: comp.lang.ada Subject: Re: Refactoring and Ada Date: Wed, 6 Feb 2002 02:51:43 -0000 Message-ID: References: <3C5AB0B7.9D75D49A@grammatech.com> <5ee5b646.0202030553.6431291a@posting.google.com> <5ee5b646.0202031817.1e8a3d90@posting.google.com> NNTP-Posting-Host: ppp-3-147.5800-9.telinco.net (212.1.138.147) X-Trace: fu-berlin.de 1012964467 42667990 212.1.138.147 (16 [25716]) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Xref: archiver1.google.com comp.lang.ada:19651 Date: 2002-02-06T02:51:43+00:00 List-Id: "Pat Rogers" wrote in message news:yZD78.8997$Bf6.3206761629@newssvr11.news.prodigy.com... > "Nick Roberts" wrote in message > news:a3mtl6$18ase0$1@ID-25716.news.dfncis.de... > > > > > It does actually raise a question in my mind: why was pragma Preelaborate > > introduced in the first place? > > It came out of the Ada Run-Time Environment Working Group (ARTEWG) Catalog of > Interface Features and Options (CIFO) for Ada 83. A member had an embedded > air-to-air missile application that took too long to elaborate -- it was already > off the rail by then, but not quite ready to fly -- hence the pragma. A number > of Ada 95's real-time facilities can be traced to the CIFO. Some of it was > overkill, but much was very good. > > That doesn't answer your question of why the compiler cannot do it > automatically, but I think the history is interesting. Yes, extremely interesting! In fact, I think I can answer my own question, very simply, having thought about it (for about five minutes). You do indeed want to have explicit directives saying "this library unit should be [preelaborated|pure]", so that the compiler will give you a warning if it cannot be (violates one of the restrictions). Simple. I really *should* think a bit more before opening my virtual big fat mouth. Sorry. PS: Many missiles nowadays are alive and active long before firing, showing their radar or images to the pilot, giving lock-on status, and for all I know offering philosophical arguments about the rights and wrongs of modern warfare. (When they go off target, it's nothing to do with cloud cover, it's a crisis of conscience ;-) -- Nick Roberts