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 Path: buffer1.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!newspeer1.nac.net!feeder.erje.net!eu.feeder.erje.net!news.stack.nl!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: container cursor type cannot be tagged Date: Fri, 29 Aug 2014 10:46:54 +0200 Organization: cbb software GmbH Message-ID: <1g31yrvn459mh.11eszm0lf3p4a$.dlg@40tude.net> References: <85ppfkxvwg.fsf@stephe-leake.org> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: yj8+JIQUMOEawvIM7K49kA.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: number.nntp.dca.giganews.com comp.lang.ada:188726 Date: 2014-08-29T10:46:54+02:00 List-Id: On Fri, 29 Aug 2014 09:59:03 +0200, J-P. Rosen wrote: > Le 29/08/2014 09:28, Dmitry A. Kazakov a écrit : >> That is another of multiple reasons why. Cursor tend to become a full class >> with descendants and primitive operations which ends up in multiple >> dispatch, for whatever reason not available. An index almost always can be >> a "final" type which makes everything a lot easier. > > Could you elaborate on what (in your view) is the difference between a > cursor and an index? Unlike index cursor/iterator carries the object's identity. It alone is sufficient to access the element. This logically decouples it (and the element as well) from the container. Any link to the container gets hidden. The identity is assumed invariant to container updates, which is only a felt invariant, since it cannot be statically enforced. All this has far reaching consequences for the usage, design and implementation. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de