From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-65-14.ec2.internal X-Spam-Level: X-Spam-Status: No, score=0.8 required=3.0 tests=BAYES_50,FREEMAIL_FROM, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Received: by 2002:a37:6407:0:b0:745:bd3d:51df with SMTP id y7-20020a376407000000b00745bd3d51dfmr1763436qkb.3.1678890242596; Wed, 15 Mar 2023 07:24:02 -0700 (PDT) X-Received: by 2002:a05:6870:ea9b:b0:172:7220:6905 with SMTP id s27-20020a056870ea9b00b0017272206905mr9118500oap.0.1678890242285; Wed, 15 Mar 2023 07:24:02 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 15 Mar 2023 07:24:02 -0700 (PDT) In-Reply-To: Injection-Info: google-groups.googlegroups.com; posting-host=2604:3d09:a81:1800:712f:3d20:2471:b344; posting-account=lzqe5AoAAADHhp_gregSufVhvwu22fBS NNTP-Posting-Host: 2604:3d09:a81:1800:712f:3d20:2471:b344 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <88ab7494-154d-4cc8-a659-b8b34cec5e06n@googlegroups.com> Subject: Re: Use Ada.Containers.Vectors Generic_Sorting or Ada.Containers.Ordered_Sets ? From: Brad Moore Injection-Date: Wed, 15 Mar 2023 14:24:02 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader01.eternal-september.org comp.lang.ada:65003 List-Id: On Tuesday, February 14, 2023 at 1:49:55=E2=80=AFAM UTC-7, reinert wrote: > Hello,=20 > ,=20 > Sometimes, I have to sort records. One possibility is to use Generig_Sort= ing under Ada.Containers.Vectors and eksplicitly use Sort. An alternative i= s to use Ada.Containders.Ordered_Sets and somehow get sorting "for free".= =20 >=20 > I would like to get arguments for and against these two alternatives.=20 >=20 > reinert I might use the generic sorting for example, for the case where the data is= more static and needs to be sorted once, whereas I'd use an ordered set if= the data is continuously being updated and manipulated, or if I needed set= semantics. Brad