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!reader02.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: =?UTF-8?Q?Re:_How_to_get_Ada_to_=e2=80=9ccross_the_chasm=e2=80=9d?= =?UTF-8?Q?=3f?= Date: Sun, 6 May 2018 09:08:06 +0200 Organization: Aioe.org NNTP Server Message-ID: References: <878t9nemrl.fsf@nightsong.com> <87h8nl50rw.fsf@nightsong.com> <87d0y97lda.fsf@nightsong.com> <874ljl7jyb.fsf@nightsong.com> NNTP-Posting-Host: kQkuQcRDy1QFvWpyB1foYw.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 Content-Language: en-US X-Notice: Filtered by postfilter v. 0.8.3 Xref: reader02.eternal-september.org comp.lang.ada:52027 Date: 2018-05-06T09:08:06+02:00 List-Id: On 2018-05-06 03:15, Dennis Lee Bieber wrote: > On Sat, 05 May 2018 16:37:32 -0700, Paul Rubin > declaimed the following: > >> "G.B." writes: >>> Does C++ have objects, not allocated via *new*, whose size in bytes will >>> be known only at run time? >> >> It has them, but you are not required to use them ;-). If you want >> proofs of memory bounds, you are better off not using those kinds of >> objects. > > And for the avionics I have been exposed to -- you do not use > constructs that require the secondary stack... Same reason -- size not > known until run-time. > > Granted -- it was a bit tedious to not be able to just concatenate > literal strings with the result of, say 'image() to format an output line; > instead needing to specify the entire literal including space for the > varying data, and substring (fixed dimensions) to placeholder(s). A job for a contract. I always wanted to be able to contract the stack space of a subprogram in Ada. The contract should be conditional of the arguments. In the case of "&" it is the caller's stack contract to verify since the result of concatenation goes to the caller's stack. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de