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!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Jeffrey Carter Newsgroups: comp.lang.ada Subject: Re: Problem implementing Iterators Date: Tue, 27 Jan 2015 13:58:38 -0700 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <9ceb847e-d064-47e7-aa11-7707b63d4308@googlegroups.com> <21e0e529-a516-4e22-a6a5-68b212f22577@googlegroups.com> <6d947a7f-7494-4dd7-96d9-0dad83589413@googlegroups.com> <016b982c-d376-4db4-bb7c-37561e7903d2@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Date: Tue, 27 Jan 2015 20:58:08 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="e4b4b8b581459d4904f1a14c474a248f"; logging-data="18687"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19JHrB7VCam5aKut11Z0EhzISG3Ev1H7bM=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 In-Reply-To: Cancel-Lock: sha1:0fgnwZVE7SUUXZpCpQ4yyA+N4sU= Xref: news.eternal-september.org comp.lang.ada:24766 Date: 2015-01-27T13:58:38-07:00 List-Id: On 01/27/2015 11:43 AM, Björn Lundin wrote: > > As I understand it, its only purpose is to tell the programmer that > this variable may be changed via pointers - beware ... My understanding is that there are certain optimizations that can be taken with unaliased objects that cannot be done with aliased objects, so this provides important information to the compiler. Some time ago (late 1980s or early 1990s) there was an article in /Ada Letters/ about why the Tartan Ada compilers were able to produce faster code for Ada versions of their C benchmarks than their C compilers. The fact that all C variables are aliased, while all Ada-83 variables are not, was one of the factors. -- Jeff Carter "When Roman engineers built a bridge, they had to stand under it while the first legion marched across. If programmers today worked under similar ground rules, they might well find themselves getting much more interested in Ada!" Robert Dewar 62