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!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.de!io.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.109.57.49.181.mobile.3.dk!not-for-mail From: Jacob Sparre Andersen Newsgroups: comp.lang.ada Subject: Re: How to get Ada to =?windows-1252?Q?=93cross?= the =?windows-1252?Q?chasm=94=3F?= Date: Wed, 09 May 2018 13:18:54 +0200 Organization: JSA Research & Innovation Message-ID: <87a7t9t6u9.fsf@jacob-sparre.dk> References: <1c73f159-eae4-4ae7-a348-03964b007197@googlegroups.com> <878t9nemrl.fsf@nightsong.com> <87h8nl50rw.fsf@nightsong.com> <87d0y97lda.fsf@nightsong.com> <87o9hsu3er.fsf@jacob-sparre.dk> <87efimy7x5.fsf@nightsong.com> <87efimtuua.fsf@jacob-sparre.dk> <87k1sdcost.fsf@nightsong.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: franka.jacob-sparre.dk; posting-host="109.57.49.181.mobile.3.dk:109.57.49.181"; logging-data="14272"; mail-complaints-to="news@jacob-sparre.dk" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) Cancel-Lock: sha1:M4WrbE/ULt0/iY5VasZLfCfHjjs= Xref: reader02.eternal-september.org comp.lang.ada:52155 Date: 2018-05-09T13:18:54+02:00 List-Id: Paul Rubin writes: > Jacob Sparre Andersen writes: >> Imagine it wasn't a string, but some other explicitly fixed size >> array. I can't see how the compiler in this case can preallocate the >> array on the primary stack as you write above. > > If it's fixed size, what's the problem? It is only fixed once an object of the type is declared. It sounds like you need to read up on "indefinite types" in Ada. >> It the explanation that C++ simply doesn't allow functions to return >> indefinite types, > > I'm not sure what you mean by an indefinite type. If it means a type > whose size isn't known at compile time, then I wouldn't consider it > fixed size in the sense of the previous paragraph. Indefinite types are types, where not all constraints are decided until you actually create an object of that type. Greetings, Jacob -- Photos from the Faroe Islands: http://billeder.sparre-andersen.dk/The_Faroe_Islands/