Naming convention for a List that people might expect to be sorted

by Dirk Boer   Last Updated January 12, 2018 23:05 PM

Our application has a lot of references to a list of i.e. Soccer matches. These soccer matches are 90% of the time sorted (at Date), in some contexts not.

The problem is that it's often quite important to know if it's sorted or not. With the possibility of detecting bugs late. Now I can prefix every reference like i.e. unsortedMatches and sortedMatches, but that feels very cumbersome in a lot of contexts.

Is this a common problem? What's a good solution?

Related Questions

Method naming: to vs as vs get

Updated April 25, 2018 02:05 AM

Naming conventions for pure functions

Updated August 19, 2018 20:05 PM