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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,38fc011071df5a27 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-06-17 08:23:41 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: fjloma@andaluciajunta.es (Francisco Javier Loma Daza) Newsgroups: comp.lang.ada Subject: Re: Ideas for Ada 200X "left hand side" repeater. Date: 17 Jun 2003 08:23:40 -0700 Organization: http://groups.google.com/ Message-ID: <404ee0af.0306170723.5600581@posting.google.com> References: <3EECA772.4B662024@adaworks.com> NNTP-Posting-Host: 80.103.114.90 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1055863421 6931 127.0.0.1 (17 Jun 2003 15:23:41 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 17 Jun 2003 15:23:41 GMT Xref: archiver1.google.com comp.lang.ada:39341 Date: 2003-06-17T15:23:41+00:00 List-Id: Bill Findlay wrote in message news:... > On 17/6/03 01:30, in article bclnfn$1ga0$1@msunews.cl.msu.edu, "Chad R. > Meiners" wrote: > > > Or how about > > > > [Pixel] Screen.Buffer(i) := Pixel + 1; > > > > where [Pixel] gives an idem name "Pixel" for Screen.Buffer(i) which can be > > used (in place of its variable) until it falls out of scope at the > > semi-colon. > > What about using 'is' to express identity? e.g.: > > Pixel is Screen.Buffer(i) in Pixel := Pixel + 1; > > It's not exactly concise, though. Nor is any 'implicit renaming' solution. Another proposal, maybe only useful for some cases, where you don't want to reevaluate the LHS because it's side effects. For example: declare -- can't do with a rename clause because of side effets item : access Object := item(iterator => it); begin item.data1 := some_function(item.data2, item.data3); end; could be like item(iterator => it).data1 := some_function(item'LHS.data2, item'LHS.data3);