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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: Why can't objects be static in Ada? Date: Wed, 17 Apr 2019 00:07:21 +0300 Organization: Tidorum Ltd Message-ID: References: <1127d366-d36c-4abf-8590-4b8c0e2b5446@googlegroups.com> <1beabd13-0c34-4d8a-9a57-45243a07ffc4@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net Ma2DTFIVr3KDI/ptecBV0QK+1DNb7XsUqeaB7iigkcXYrwHcJj Cancel-Lock: sha1:r/Mcy7hXmefiON2dC6/+hdErjJw= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 In-Reply-To: <1beabd13-0c34-4d8a-9a57-45243a07ffc4@googlegroups.com> Xref: reader01.eternal-september.org comp.lang.ada:56142 Date: 2019-04-17T00:07:21+03:00 List-Id: On 19-04-16 23:56 , Lucretia wrote: > On Tuesday, 16 April 2019 13:11:36 UTC+1, Mark Lorenzen wrote: > >> How can it be ensured that a library written in Ada does not >> require any elaboration. Pragma Pure? I think that such libraries >> are "nice" but pragma Pure is too restrictive for that purpose. In >> such cases it would be good, if e.g. the OP's problem could be >> solved at compile time without any elaboration. Why are you so fixated on elaboration? Many non-Ada libraries require initialization calls. Moreover, I believe a C++ program can have compiler-generated initialization code similar to Ada elaboration code. > I don't think it can, going by this thread. I also think this is why > Ada will fail in other environments, i.e. not security or safety > critical stuff, but where performance is important. Performance is plenty important in many embedded real-time applications, where Ada works just fine. Elaboration of library items consumes execution time only at the start of a program. Do you have some stringent start-up deadlines? -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .