Especially in IT it is often neccessary to write chains of nouns like messages list because one cannot use list of messages for a variable name in a programming language.
I can't understand how to construct them correctly for plurals, for example is it a "message list" or "messages list"? What grammar rules concern this subject?
As a maybe special case, I'm interesting in naming the number of something, for example the number of apples. It is common to use "apple count" (although count means counting, not quantity). What is right, "apple count" or "apples count", and why?
I found a little bit similar question. Maybe both forms are allowed?
list_of_messagesinstead of only compound nouns likemessage_listin a programming context? People do this all the time by using full phrases in real English, whether that means Verb Phrases for function names liketentatively_mark_messages_for_deletion, or Noun Phrases for variable names likemessages_marked_for_deletionor evenexpired_messages_marked_for_deletion_after_midnight. Sticking as close to real English as possible for identifiers *greatly* improves code readability! – tchrist Sep 06 '21 at 13:23