As a non native english speaker I have a recurring problem with this: > getInstances(); // ok, returns an array of instances > getInstanceId(); // ok, returns an id > getInstancesId(); // ??, returns an array of id > get InstancesIds(); // ?? returns an array of id > getIdsOfInstances(); // ?? returns an array of id > getAllInstancesId(); // ?? returns an array of id > getAllInstancesIds(); // ?? returns an array of…
As a native English speaker (and former English teacher), hope this helps: > getInstances(); // ok, returns an array of instances Correct. > getInstanceId(); // ok, returns an id Correct. > getInstancesId(); // ??, returns an array of id Unusual, but would return a single ID referring to a collection of instances. > get InstancesIds(); // ?? returns an array of id Correct. Though more common would be getInstanceIds()…
I don't know why an instance would have more than one id, probably more plausible with different nouns, but a similarly named function might return an array of arrays, or a flattened equivalent, possibly uniqued.
Probably a bad idea though. I have been guilty (though pleasurably, pridefully guilty) of abusing plurals -- day, days, dayses etc. If you can let the types do the talking that's obviously better, and more descriptive (and less eccentric) names can help a lot with communication and clarity, but there is also sometimes a place for brevity, and for levity.