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,70414f56d810c10c X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Received: by 10.68.25.8 with SMTP id y8mr1614783pbf.16.1316417960689; Mon, 19 Sep 2011 00:39:20 -0700 (PDT) Path: lh7ni299pbb.0!nntp.google.com!news1.google.com!goblin1!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: discriminant questions Date: Mon, 19 Sep 2011 09:39:15 +0200 Organization: cbb software GmbH Message-ID: References: <9f37b726-d80b-4d24-bf3f-28a14255f7fd@s20g2000yql.googlegroups.com> <86015926-d652-4265-aedd-413312d399f9@dq7g2000vbb.googlegroups.com> <0d272f62-67d0-4905-972c-8a7e912c5531@en1g2000vbb.googlegroups.com> <148cxoyabima2.16mz6xwdph2hj.dlg@40tude.net> <01a1374f-59ab-40be-9e39-0640cb2a513d@n35g2000yqf.googlegroups.com> <1fp2o673mu9az$.d9loz1zbcl0d.dlg@40tude.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: FbOMkhMtVLVmu7IwBnt1tw.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news1.google.com comp.lang.ada:18026 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Date: 2011-09-19T09:39:15+02:00 List-Id: On Sun, 18 Sep 2011 12:20:26 -0700 (PDT), Maciej Sobczak wrote: > On Sep 18, 8:01�pm, "Dmitry A. Kazakov" > wrote: > >> I don't care about iterators and accessors, they IMO are just >> misconceptions coming from languages with pointers. > > Problem: enumerate elements from two parallel containers (aka > zipping). What is wrong with using relative positions? Actually, mathematically, there is no other way, and the word enumeration technically means a mapping of the elements of a set onto a set numbers. > Which might mean that the concept of pointers is not completely > missing the point (pun intended). It does. Consider a container located in a machine registers, where are the pointers? The pointer itself is based on an enumeration in mathematical sense of this word, where memory elements are mapped onto numbers. The problem of pointers/iterators etc is that they require more than needed (persistent element identity), which is a burden for both the container designer and the user of. It might be a minor problem for C++, which walked wrong path from very beginning: in C you can have pointer to almost anything. But Ada tried not fall into this. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de