help / color / mirror / Atom feed
From: Marius Amado-Alves <>
Subject: Re: Use Ada.Containers.Vectors Generic_Sorting or Ada.Containers.Ordered_Sets ?
Date: Wed, 15 Mar 2023 03:05:34 -0700 (PDT)	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

> Sometimes, I have to sort records. One possibility is to use Generig_Sorting under Ada.Containers.Vectors and eksplicitly use Sort. An alternative is to use Ada.Containders.Ordered_Sets and somehow get sorting "for free". 
> I would like to get arguments for and against these two alternatives. 
> reinert

Sets have slightly stricter semantics, namely no duplicates. Normally, if the real data has this semantics, you should use sets (and populate with Include or else catch the exception raised upon trying to Insert a duplicate).

  parent reply	other threads:[~2023-03-15 10:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-14  8:49 Use Ada.Containers.Vectors Generic_Sorting or Ada.Containers.Ordered_Sets ? reinert
2023-02-14  9:35 ` Jeffrey R.Carter
2023-02-14 10:46   ` reinert
2023-02-14 18:48     ` G.B.
2023-03-15 10:05 ` Marius Amado-Alves [this message]
2023-03-15 14:24 ` Brad Moore
replies disabled

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