On Sat, 3 Oct 2020, Mattias Gaertner via fpc-pascal wrote:

On Sat, 3 Oct 2020 15:53:58 +0200 (CEST)
Michael Van Canneyt via fpc-pascal <[email protected]>
wrote:

On Fri, 2 Oct 2020, Ryan Joseph via fpc-pascal wrote:
[...]
> Thanks. Sneaky that sorted had to be set to true. Not sure why that
> would be.
Because otherwise it would take a linear search to do IndexOf
whenever you insert/append an element in the list.

Insert element is linear anyway.

But it does not need a search, I suppose ?


Why not set Duplicate to dupAccept as default?

Just guessing:
Because it is a map, and usually you don't want a map to contain duplicates ?

If any change is needed, I would set the 'Sorted' to true by default.

Michael.
_______________________________________________
fpc-pascal maillist  -  [email protected]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to