As a non-native English speaker, I often wonder about using the plural form in the initial part(s) of noun phrases when naming classes or objects.
For example:
If I have an interface to multiple [streaming] players, it is good English to name it
PlayersInterface, as opposed toPlayerInterfacewhich is an interface to one player?If there is a service that handles events, is it ok to name it
EventsService? Or doesEventServicesound significantly better?
Thank you for your help!
EDIT:
Obviously in .NET an interface name would start with an
I. So let's change the example a bit and call itPlayersGateway.I don't really have another class named
PlayerInterface(orPlayerGateway). It was just an example of an alternative name I would use if I only needed an interface to one player. I think that using bothPlayerGatewayandPlayersGatewayin the same project is hard to maintain, not to say evil to future team members. So please assume there is noPlayerGateway, justPlayersGateway.
In English, when you stick a noun next to another noun to modify it, you usually use the singular:
even though there may be several coats in the room or guards in the tower. IMHO, variable naming should follow the general rules of the language.