Singular or plural on function that may return more than one item of a list?
up vote
0
down vote
favorite
Given a method that returns one or more items from a list, should I name it getListItem , or getListItems ? Or, do I avoid the ambiguity and provide both methods? I'm anticipating there being a 50/50 chance of it returning one vs. multiple items. I'd like to keep my codebase concise, but ideally I wouldn't want to introduce any idiosyncratic or ambiguous naming.
naming-conventions
share | improve this question
asked Nov 20 at 14:48
Ro Achterberg
165 1 10