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,54889de51045a215 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-10-07 11:28:54 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: aek@vib.usr.pu.ru (Alexander Kopilovitch) Newsgroups: comp.lang.ada Subject: Re: += in ada Date: 7 Oct 2003 11:28:54 -0700 Organization: http://groups.google.com Message-ID: References: <3F7316F7.219F@mail.ru> <17cd177c.0310010606.52da88f3@posting.google.com> <49cbf610.0310070205.2937e71a@posting.google.com> NNTP-Posting-Host: 213.33.245.218 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1065551334 25700 127.0.0.1 (7 Oct 2003 18:28:54 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 7 Oct 2003 18:28:54 +0000 (UTC) Xref: archiver1.google.com comp.lang.ada:387 Date: 2003-10-07T11:28:54-07:00 List-Id: Lutz Donnerhacke wrote: > declare > a : Typ renames X(b(i).all + 7); > begin > a := a + 2/a; > end; > > is legal Ada and a common idiom. > > ... > > So I have to conlude, that the whole "idem" Idiom is useless at all. But "idem" require neither identifier nor declare-begin-end, and it is purely local. Sometimes it is better to use renaming, but far from always - there are enough cases where "idem" is better... and more natural. Use of renaming here is just a middle of the spectre of solutions, where one edge is a function returning access (which is generally more burdensome in Ada than in C) and another edge is "idem". Alexander Kopilovitch aek@vib.usr.pu.ru Saint-Petersburg Russia