From: Stephen Leake <stephen_leake@stephe-leake.org>
Subject: Re: Generalized Loop Iteration and User-Defined Indexing with more than two parameters.
Date: Sat, 07 Nov 2020 15:54:14 -0800 [thread overview]
Message-ID: <864km0vi3d.fsf@stephe-leake.org> (raw)
In-Reply-To: ro4rgd$9s3$1@franka.jacob-sparre.dk
"Randy Brukardt" <randy@rrsoftware.com> writes:
> "Blady" <p.p11@orange.fr> wrote in message
> news:ro3qms$1vdh$1@gioia.aioe.org...
>
>> 2) In Ada.Iterator_Interfaces, why Has_Element is a generic formal
>> parameter instead of an abstract function of Forward_Iterator interface?
>> As:
>> function Has_Element
>> (Object : Forward_Iterator;
>> Position : Cursor) return Boolean is abstract;
>> The current way requires that Cursor type has the container reference
>> embedded and cannot be a simple index type.
>
> I suppose other designs could have been chosen.
In addition, you can store the container reference in your Iterator object.
--
-- Stephe
Written from unceded ancestral homelands of the Huichiun, an Ohlone
people,for which I pay Shuumi Land Tax
prev parent reply other threads:[~2020-11-07 23:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-01 18:41 Generalized Loop Iteration and User-Defined Indexing with more than two parameters Blady
2020-11-03 11:05 ` Stephen Leake
2020-11-06 15:39 ` Blady
2020-11-07 0:58 ` Randy Brukardt
2020-11-07 17:46 ` Blady
2020-11-10 1:45 ` Randy Brukardt
2020-11-07 23:54 ` Stephen Leake [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox