Currenlty by default sets and maps are iterated by last modification order. For most cases it plays well, still it might be wise to expose compare method which can be overriden for certain use cases
e.g. we may have list of countries, that we want to be iterated alphabetically, we can define them that way in model, but what if want to assure alphabetical order in any language (where labels will be different for each language), with custom compare method, it'll be possible to assure universal alphabetical order for such type.
/cc @kamsi @nix1
Currenlty by default sets and maps are iterated by last modification order. For most cases it plays well, still it might be wise to expose
compare
method which can be overriden for certain use casese.g. we may have list of countries, that we want to be iterated alphabetically, we can define them that way in model, but what if want to assure alphabetical order in any language (where labels will be different for each language), with custom
compare
method, it'll be possible to assure universal alphabetical order for such type.