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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,547e6c7b9fae4e1d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-01-25 03:03:25 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!fu-berlin.de!uni-berlin.de!dialin-145-254-037-068.arcor-ip.NET!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Instanciation in a package spec. Date: Sat, 25 Jan 2003 12:04:11 +0100 Organization: At home Message-ID: References: <8d103vca385t457d6p2e8uch8qe8p706g7@4ax.com> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: dialin-145-254-037-068.arcor-ip.net (145.254.37.68) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: fu-berlin.de 1043492603 30085862 145.254.37.68 (16 [77047]) User-Agent: KNode/0.7.1 Xref: archiver1.google.com comp.lang.ada:33421 Date: 2003-01-25T12:04:11+01:00 List-Id: Robert A Duff wrote: > Dmitry A. Kazakov writes: > >> >The problem here is the elaboration model of Ada. The *visibility* of >> >things is too closely tied to the *elaboration* order. I have worked >> >out a different model of elaboration that doesn't have this problem (but >> >still retains all the advantages of the Ada model). Unfortunately, it's >> >not Ada. >> >> Why it cannot become Ada? > > My model would require incompatible changes to Ada. > Therefore, it would be suitable for a from-scratch language design, > but it is not suitable for a modification to Ada as it stands today. One can call a surgeon now, or wait till a butcher comes. (:-)) >> In other words, what is the price of your model? >> >> Can X become static (in your model), when F is pure? > > Well, I have ideas along those lines, but I think that's a separate > issue. It depends exactly how "pure" is defined. Are you willing to > tolerate pure functions with infinite loops? So the compiler will go > into an infinite loop evaluating a call to F at compile time? > Sounds OK to me, but it might surprise some folks. pragma Limit_Compile_Time (); -- (:-)) > Ada currently has no pragma Pure for individual functions. Just > packages. Yes, that is bad. > Ada currently allows machine-code inserts in pure code. Must the > compiler have access to the target machine during compilation? Target machine emulation, ooch. I'd better drop machine-code insertions for pure code. > Is it even meaningful? The problem is how far one could go. Compile-time static objects used at run-time may still require some sort of additional elaboration before first use. I.e. an object could be potentially elaborated twice. How to reconcile that. -- Regards, Dmitry A. Kazakov www.dmitry-kazakov.de