6

This question already has an answer here:

My question is connected with programming. I'm not sure how to name my class.

Should it be ItemQueue or ItemsQueue? We are talking about queue, which stores many items. We can add new ones or remove existing. Similary, what about file list/files list? I have always wondered which form should I choose.

marked as duplicate by RegDwigнt Apr 19 '14 at 21:25

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

5

To keep in line with what most people are accustomed to it needs to stay singular. Queue and list already convey that there will be multiple, so having the plural word almost makes it read possessive.

The two most common example using file are:

  • File Browser
  • File Manager

Not files.

  • I agree it should be singular: ItemQueue. It gets fun if you want to have a queue of lists. You might then name it Queue<List<Item>> itemListQueue (instead of itemListsQueue, which doesn't sound right). :) – brandonjsmith Apr 18 '14 at 19:19
  • What about "high building count" vs. "high buildings count"? I'm not a native speaker, but to me the first variant sounds more ambiguous and can be read as "high (building count)" vs. "(high buildings) count". For me, the awkwardness remains even when the adjective is not very compatible with the word "count" (e.g. "preceding click count"). – Ark-kun Jun 24 '17 at 3:41
0

You can call it:

listOfFiles in camelCase

or

FileList

create listOfFiles from items in itemQueue

I'd prefer the first one since it is clearer and easier to extend:

Also see file-cabinet or filing cabinet.

  • 1
    Except that a queue is not a list. I wouldn't use FileList for a queue containing files or filenames. But I would if it were a generic list (e.g. in .NET: IList<File>). – Cyberherbalist Apr 18 '14 at 16:46

Not the answer you're looking for? Browse other questions tagged or ask your own question.