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-01 18:31:01 PST Path: archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!crtntx1-snh1.gtei.net!news.gtei.net!newsfeed1.easynews.com!easynews.com!easynews!elnk-pas-nf1!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread2.news.pas.earthlink.net.POSTED!a6202946!not-for-mail From: Jeffrey Carter Organization: jrcarter commercial-at acm [period | full stop] org User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Main subprogram at library level (was: library level required or not?) References: <1047ia2f8afucd9@corp.supernews.com> In-Reply-To: <1047ia2f8afucd9@corp.supernews.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Tue, 02 Mar 2004 02:31:01 GMT NNTP-Posting-Host: 63.184.8.40 X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.news.pas.earthlink.net 1078194661 63.184.8.40 (Mon, 01 Mar 2004 18:31:01 PST) NNTP-Posting-Date: Mon, 01 Mar 2004 18:31:01 PST Xref: archiver1.google.com comp.lang.ada:5996 Date: 2004-03-02T02:31:01+00:00 List-Id: 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? -- Jeff Carter "Your mother was a hamster and your father smelt of elderberries." Monty Python & the Holy Grail 06