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.
My main argument for using Ordered_Sets is that it seems to be less verbose and somehow garanteres sorting. Myset.Last/First always provides the "largest"/"smallest" element.
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
Hello,
,
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
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 402 |
Nodes: | 16 (2 / 14) |
Uptime: | 18:56:16 |
Calls: | 8,394 |
Calls today: | 2 |
Files: | 13,168 |
Messages: | 5,902,655 |