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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9aa4352fa83d37dc X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-03-02 14:38:27 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!border1.nntp.ash.giganews.com!border2.nntp.ash.giganews.com!nntp.giganews.com!elnk-atl-nf1!elnk-nf2-pas!elnk-pas-nf1!newsfeed.earthlink.net!sn-xit-02!sn-xit-06!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Main subprogram at library level (was: library level required or not?) Date: Tue, 2 Mar 2004 16:37:51 -0600 Organization: Posted via Supernews, http://www.supernews.com Message-ID: <104a370t2sred07@corp.supernews.com> References: <1047ia2f8afucd9@corp.supernews.com> X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 X-Complaints-To: abuse@supernews.com Xref: archiver1.google.com comp.lang.ada:6019 Date: 2004-03-02T16:37:51-06:00 List-Id: "Jeffrey Carter" wrote in message news:FlS0c.14848$yZ1.11477@newsread2.news.pas.earthlink.net... > Randy Brukardt wrote: > > > *Types* derived from Controlled have to be at library-level. > > I have just had an idea. Suppose we had a standard pragma that declared > that a library-level subprogram was a main subprogram. The subprogram > could then only be a main subprogram and could not be called by itself > or another subprogram, only by the environment task. > > The declarative region of such a subprogram would then be considered to > be at the library level, allowing controlled types to be declared there. > > This would make Ada a little easier for newcomers without impacting > existing code, which would not have the pragma and hence would not allow > controlled types there. > > Has anything like this been proposed before? Any thoughts as to whether > it is likely to fly if submitted as an AI? AI-344 proposes to remove the restriction altogether. Certainly a better idea than eliminating it in one weird place... (But I don't know what will happen with that AI - it has not been discussed much to date.) Randy.