A collection like in:
- A list of users
- A group of cities
When attaching this as we do in software development to name variables, should it be named
- userList vs usersList
- cityGroup vs citiesGroup
which one is syntactically more correct?
A collection like in:
When attaching this as we do in software development to name variables, should it be named
which one is syntactically more correct?
You are correct that the plural is used in phrases such as "a list of users". However, your variable-names copy a different sort of phrase in English. This is where a noun (the head noun) is modified by a noun coming before the head noun. In this case the modifier is generally in the singular(1). Thus we would write "user list", and thus the variable-name would be better as userList.
(1) There are exceptions, such as "jeans pocket", but in those cases the modifier is a noun which is not normally used in the singular. Your examples are not of this exceptional type.