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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM 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.20.225 with SMTP id q1mr1889356pbe.22.1316462415929; Mon, 19 Sep 2011 13:00:15 -0700 (PDT) Path: lh7ni653pbb.0!nntp.google.com!news1.google.com!postnews.google.com!u20g2000yqj.googlegroups.com!not-for-mail From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Re: discriminant questions Date: Mon, 19 Sep 2011 13:00:15 -0700 (PDT) Organization: http://groups.google.com 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> NNTP-Posting-Host: 83.3.40.82 Mime-Version: 1.0 X-Trace: posting.google.com 1316462415 31085 127.0.0.1 (19 Sep 2011 20:00:15 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 19 Sep 2011 20:00:15 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: u20g2000yqj.googlegroups.com; posting-host=83.3.40.82; posting-account=bMuEOQoAAACUUr_ghL3RBIi5neBZ5w_S User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HUALESNKRC X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13,gzip(gfe) Xref: news1.google.com comp.lang.ada:18033 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2011-09-19T13:00:15-07:00 List-Id: On Sep 19, 9:39=A0am, "Dmitry A. Kazakov" wrote: > > 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 mappi= ng > of the elements of a set onto a set numbers. Mathematically you can pretend that the physicality of some operations can be ignored. But try your idea with linked lists. > > 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 t= he > pointers? I'm not interested in impractical examples. Note also that it is a problem of the compiler, not mine - the same issue as with access to single variable, which might be possibly stored in a register. I don't need to know how this is done at the level of registers, I'm interested in high-level results. > The pointer itself is based on an enumeration in mathematical > sense of this word, where memory elements are mapped onto numbers. Interesting, but off-topic. What we are interested in is not memory elements, but the ability of some entity (the iterator) to represent - and be dereferenced! - a value within the container. > The problem of pointers/iterators etc is that they require more than need= ed > (persistent element identity), which is a burden for both the container > designer and the user of. Could you elaborate and why this is a problem? > But Ada tried not fall into this. But now we see that the idea is useful. Like in container zipping. -- Maciej Sobczak * http://www.msobczak.com * http://www.inspirel.com