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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,fe5e779eaf4ecf02 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!feeder.news-service.com!feeder1.cambrium.nl!feed.tweaknews.nl!193.141.40.68.MISMATCH!npeer.de.kpn-eurorings.net!npeer-ng2.kpn.DE!news.uni-stuttgart.de!not-for-mail From: Stefan Bellon Newsgroups: comp.lang.ada Subject: Re: Returning ranges from a function (was: How to loop (elegant) throug a vector ?) Date: Mon, 23 Jun 2008 11:47:42 +0200 Organization: Comp.Center (RUS), U of Stuttgart, FRG Message-ID: <20080623114742.748d3869@cube.tz.axivion.com> References: <20080620191237.5971480b@cube.tz.axivion.com> <6ebe0cd8-288e-4997-94d7-61905fd2dfc0@r66g2000hsg.googlegroups.com> <20080622204713.2127db4f@cube.tz.axivion.com> <37e7c45f-7c3d-464a-8a66-f5911443ec34@d45g2000hsc.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: infosun2.rus.uni-stuttgart.de 1214214445 8377 129.69.226.23 (23 Jun 2008 09:47:25 GMT) X-Complaints-To: news@news.uni-stuttgart.de NNTP-Posting-Date: Mon, 23 Jun 2008 09:47:25 +0000 (UTC) X-Newsreader: Claws Mail 3.4.0 (GTK+ 2.12.10; i486-pc-linux-gnu) X-URL: http://www.axivion.com/ Xref: g2news1.google.com comp.lang.ada:813 Date: 2008-06-23T11:47:42+02:00 List-Id: On Sun, 22 Jun, Maciej Sobczak wrote: > What about "independent addressability" from 13.3? The text is a bit > dense, but I conclude that the 'Size attribute does not have to be > strictly obeyed by the implementation. I don't think this applies here as the array components are not aliased and thus there is no need for independent addressability. Perhaps the compiler should allocate memory for each component as soon as "aliased" is specified. But in any case my "range objects" do not rely on the compiler not allocating memory. This is just a nice and efficient side-effect of the compiler implementation. So, even if the compiler implementation does not have to optimise, the semantics of my "range objects" is guaranteed and for the GNAT implementation it is even optimal concerning memory. -- Stefan Bellon