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: a07f3367d7,70414f56d810c10c X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!feeder.news-service.com!feeder.news-service.com!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: discriminant questions Date: Tue, 20 Sep 2011 09:33:33 +0200 Organization: cbb software GmbH Message-ID: <14tiipigyejtc$.hyp7e82egqwq$.dlg@40tude.net> 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: g2news2.google.com comp.lang.ada:21982 Date: 2011-09-20T09:33:33+02:00 List-Id: On Mon, 19 Sep 2011 13:00:15 -0700 (PDT), Maciej Sobczak wrote: > But try your idea with linked lists. Linked list is not a container, nor need it any iterators. We have to distinguish the interfaces and implementations, BTW. >>> 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? > > I'm not interested in impractical examples. It is a very practical example, because the same problem arise with all sorts of caching techniques for containers handled externally, e.g. network peers, DB engines, hardware accelerators etc, everywhere identifying objects is expensive and sometimes fundamentally impossible (e.g. in relational models). > I don't need to know how this is done at the > level of registers, I'm interested in high-level results. That is why iterators fail. > 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. See, iterator has pointer semantics, count me out. >> 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. > > Could you elaborate and why this is a problem? You stated it already. Iterator is a pointer to the container and to an element in it, too bad. >> But Ada tried not fall into this. > > But now we see that the idea is useful. Like in container zipping. Again, I don't see it useful, I see it harmful. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de