comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: container cursor type cannot be tagged
Date: Fri, 29 Aug 2014 10:46:54 +0200
Date: 2014-08-29T10:46:54+02:00	[thread overview]
Message-ID: <1g31yrvn459mh.11eszm0lf3p4a$.dlg@40tude.net> (raw)
In-Reply-To: ltpbs4$h4i$1@dont-email.me

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


  reply	other threads:[~2014-08-29  8:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-28 19:21 container cursor type cannot be tagged Stephen Leake
2014-08-28 20:25 ` Randy Brukardt
2014-08-29  7:28   ` Dmitry A. Kazakov
2014-08-29  7:59     ` J-P. Rosen
2014-08-29  8:46       ` Dmitry A. Kazakov [this message]
2014-08-29 23:08     ` Randy Brukardt
2014-08-29 14:50   ` Stephen Leake
2014-08-29 23:00     ` Randy Brukardt
2014-08-30 15:16       ` Stephen Leake
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox