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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,55f6e230b02eff2f X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!feeder1-2.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Containers - nontrivial element access Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <1191275759.184463.238350@n39g2000hsh.googlegroups.com> <1191358254.405682.320670@22g2000hsm.googlegroups.com> <4hBMi.132431$Fc.72735@attbi_s21> Date: Wed, 3 Oct 2007 10:26:32 +0200 Message-ID: <10xbnt0vkcyeo.5t72qwg3umwd.dlg@40tude.net> NNTP-Posting-Date: 03 Oct 2007 10:26:34 CEST NNTP-Posting-Host: df76b96a.newsspool4.arcor-online.net X-Trace: DXC=>]2QNL_Il4Pf8j24CD<3lP4IUK On Wed, 03 Oct 2007 00:22:24 GMT, Jeffrey R. Carter wrote: > You must. C++ is based on widespread use of reference semantics; Ada on > value semantics. How so? Ada abstracts by-value/reference issue away (except for some special cases). Whether an in-out parameter is passed by reference or by value is not a question of sematic in Ada. > Any non-trivial comparison compares reference semantics > to value semantics, also known as apples to oranges. This is IMO utterly wrong. The semantics of swapping element's fields is well-defined independently on the way of access. In question in not the semantics of, but the syntax sugar, namely an array-like indexing of the container. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de