I'm sometimes torn between two naming conventions defining the order of words that make up a function name. The first one is choosing the words in the same order we would natural use in a sentence, for example:
getFilters(...)
getPairedFilters(...)
getUniquePairedFilters(...)
This reads rather naturally but it's not immediately obvious that all of those functions return filters. Only the last part of the function name indicates that. If the name is long, that's not as convenient as the following:
getFilters(...)
getFiltersPaired(...)
getFiltersPairedUnique(...)
This, however, does not read as naturally but the names immediately suggest that they all return filters. Is there some sort of a consensus what name ordering is "better"?
getFilters().paired().unique()
etc...getFilters(...): Filter[]
andgetUniquePairedFilters(...): Filter[]
you know it returns filters because that's what the return type is.