From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM,NICE_REPLY_A autolearn=ham autolearn_force=no version=3.4.6 Path: eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: =?UTF-8?Q?Bj=c3=b6rn_Lundin?= Newsgroups: comp.lang.ada Subject: Re: Adacore joins with Ferrous Systems to support Rust Date: Thu, 3 Feb 2022 10:54:43 +0100 Organization: A noiseless patient Spider Message-ID: References: <87o83pzlvm.fsf@nightsong.com> <87bkzpyqx3.fsf@nightsong.com> <8735l0zo6j.fsf@nightsong.com> <87v8xwy3y7.fsf@nightsong.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Thu, 3 Feb 2022 09:54:44 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="f2141bf9e2782ba22cbc6de31b5de8b3"; logging-data="17272"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+dUZjuFqrzCoGUxivvKN2P" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Cancel-Lock: sha1:lF597WDUgaaUePNkwAGIup2T/vw= In-Reply-To: <87v8xwy3y7.fsf@nightsong.com> Content-Language: sv Xref: reader02.eternal-september.org comp.lang.ada:63462 List-Id: Den 2022-02-03 kl. 05:22, skrev Paul Rubin: > Particularly, a lot of effort in Ada programming goes into making > programs never crash. For example, if the program runs out of memory > during operation it might crash, so Ada programs are often written to > never allocate new memory after a startup phase. In C++ or Rust, it's > important not to get wrong answers like 2+2=5, but if your program runs > out of memory and crashes, go get a bigger computer. So idiomatic C++ > and Rust programming uses dynamic allocation freely, and that makes some > kinds of programming more convenient, at the expense of tolerating > possible crashes. That depends on the domain. Perhaps it is true in embedded. I use Ada for large systems, talking to databases, and lots of administrative work. On a win/Unix server. We would not dream of pre-allocate memory at startup. We allocate and dispose as needed. -- Björn