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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,f0be8eebb2993001 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!k7g2000yqj.googlegroups.com!not-for-mail From: AdaMagica Newsgroups: comp.lang.ada Subject: Re: Ada 2012 : aliased parameters ? Date: Mon, 28 Mar 2011 04:56:51 -0700 (PDT) Organization: http://groups.google.com Message-ID: <8adad214-6381-4296-9097-878fbb517f6e@k7g2000yqj.googlegroups.com> References: NNTP-Posting-Host: 80.156.44.178 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1301313412 2707 127.0.0.1 (28 Mar 2011 11:56:52 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 28 Mar 2011 11:56:52 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: k7g2000yqj.googlegroups.com; posting-host=80.156.44.178; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 5.2; WOW64; rv:2.0) Gecko/20100101 Firefox/4.0,gzip(gfe) Xref: g2news1.google.com comp.lang.ada:18542 Date: 2011-03-28T04:56:51-07:00 List-Id: Aliased parameters are meant to cure a deficiency in e.g. containers. With current Ada, it's awkward to replace an element of a container. Now if you make the curser an aliased parameter, the function result may dereference safely the cursor, since the cursor and the result are tightly coupled, i.e. the cursor cannot be changed as long as the function result exists: function Get (Pos: aliased Cursor) return access Element; This is the idea. The syntax in this example might not be correct.