From: "Jeffrey R.Carter" <spam.jrcarter.not@spam.acm.org.not>
Subject: Re: Calling inherited primitive operations in Ada
Date: Mon, 5 Sep 2022 11:30:56 +0200 [thread overview]
Message-ID: <tf4fkg$3hmgk$1@dont-email.me> (raw)
In-Reply-To: <458444ed-e384-4663-896c-bb38dae3c5cbn@googlegroups.com>
On 2022-09-05 08:56, Emmanuel Briot wrote:
>
> I definitely see the same issue. The way my library is trying to workaround that is as follows:
> Those instantiations are only needed for people who want/need to control every aspects of their containers, for instance
> how elements are stored, how/when memory is allocated, what is the growth strategy for vectors, and so on.
> Most users should not have to care about that in practice. So we use code generation at compile time to generate
> high-level packages similar to the Ada containers, with a limited set of formal parameters (in src/generated, to be
> more specific). We can generate bounded/unbounded versions, definite/indefinite versions, and any combination of
> those.
This seems backwards. The user should encounter the forms most likely to be used
first; if part of the packages are in a subdirectory, those should be the ones
less likely for the typical user to use.
> Although it is certainly true that using holders works, it is not applicable when designing a containers library that intends to be
> mostly compatible with Ada containers. The latter have chosen, long ago and before Holder was a thing, to have definite and
> indefinite versions. The main benefit to this approach is that users still retrieve directly the type they are interested in (e.g. String)
> rather than a holder-to-string.
Before Ada.Containers existed, I commonly used definite data structures from the
PragmARCs with Unbounded_String, which is partly a specialized holder for String
(and partly a specialized Vector for Positive/Character). Generalizing from this
led to implementing a Holder pkg.
When I said a holder is the only indefinite pkg that is needed, I meant to imply
that other indefinite structures would be implemented using the definite form +
holder.
--
Jeff Carter
“Bug rates in C++ are running higher even than C ...”
Stephen F. Zeigler
216
next prev parent reply other threads:[~2022-09-05 9:30 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-31 8:15 Calling inherited primitive operations in Ada Emmanuel Briot
2022-08-31 17:11 ` DrPi
2022-08-31 19:13 ` Dmitry A. Kazakov
2022-09-01 6:56 ` Emmanuel Briot
[not found] ` <67b32db0-c4db-466c-ac13-e597e008c762n@googlegroups.com>
2022-09-01 10:02 ` Dmitry A. Kazakov
2022-09-01 11:59 ` Jeffrey R.Carter
2022-09-01 12:37 ` Dmitry A. Kazakov
2022-09-01 13:37 ` Jeffrey R.Carter
2022-09-01 14:10 ` Emmanuel Briot
2022-09-01 15:50 ` amo...@unizar.es
2022-09-01 16:03 ` Jeffrey R.Carter
2022-09-01 16:07 ` Emmanuel Briot
2022-09-01 16:17 ` Jeffrey R.Carter
2022-09-01 18:54 ` Emmanuel Briot
2022-09-01 21:33 ` Jeffrey R.Carter
2022-09-02 6:11 ` Emmanuel Briot
2022-09-02 10:55 ` Jeffrey R.Carter
2022-09-02 11:20 ` Emmanuel Briot
2022-09-02 14:28 ` Jeffrey R.Carter
2022-09-03 0:16 ` Randy Brukardt
2022-09-03 0:07 ` Randy Brukardt
2022-09-03 8:59 ` Jeffrey R.Carter
2022-09-07 0:42 ` Randy Brukardt
2022-09-03 19:00 ` Simon Wright
2022-09-05 6:56 ` Emmanuel Briot
2022-09-05 7:34 ` Dmitry A. Kazakov
2022-09-05 9:30 ` Jeffrey R.Carter [this message]
2022-09-07 0:51 ` Randy Brukardt
2022-09-02 8:35 ` amo...@unizar.es
2022-09-02 8:48 ` Dmitry A. Kazakov
[not found] ` <9484a755-f55d-407e-a40b-92421b0bcafbn@googlegroups.com>
2022-09-02 9:55 ` Dmitry A. Kazakov
2022-09-02 10:41 ` Jeffrey R.Carter
2022-09-02 11:04 ` Dmitry A. Kazakov
2022-09-03 0:12 ` Randy Brukardt
2022-09-03 8:23 ` Dmitry A. Kazakov
2022-09-03 0:01 ` Randy Brukardt
2022-09-05 8:53 ` amo...@unizar.es
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox