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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: Victor Porton Newsgroups: comp.lang.ada Subject: Re: Array of Unbounded_String vs Indefinite_Vectors(Natural, String) Date: Sun, 22 Oct 2017 13:52:54 +0300 Organization: Aioe.org NNTP Server Message-ID: References: <9588f435-6437-458d-9a3a-468fc96e0865@googlegroups.com> NNTP-Posting-Host: 8U0x309/ia0QUzusgm/krA.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit X-Complaints-To: abuse@aioe.org User-Agent: KNode/4.14.10 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:48562 Date: 2017-10-22T13:52:54+03:00 List-Id: Shark8 wrote: > On Saturday, October 21, 2017 at 3:48:48 PM UTC-6, Victor Porton wrote: >> I need to develop an API which return a list of strings. >> >> I have two possible design choices for the result type: >> >> 1. type T is array(Natural range <>) of Unbounded_String; >> >> 2. package V is new Ada.Containers.Indefinite_Vectors(Natural, String); >> >> Which one of the two to choose? >> >> The first has the advantage that it is a regular array not a fancy >> container. The second one has the advantage that the element type is >> String not a fancy Unbounded_String. >> >> Please help me to make the choice! > > Personally I like the vector option. Why? -- Victor Porton - http://portonvictor.org