How to call properties of many objects properly?

In programming, there are lots of times where we need to access attributes of multiple objects. E.g., when we want to refer to the color of many cars.

Suppose each car has only one color. And I want to set the color of each car to red.

How do I say it?

  1. Set all cars colors to red
  2. Set all cars' colors to red
  3. Set all car's colors to red
  4. Set all cars' color to red
  5. Set all car colors to red

You have a couple of choices here, depending on exactly what you're trying to express.

I need to mention that if you just say all, you are referring to all cars, everywhere—or to the generic concept of cars. If you are only considering a specific and finite number of cars (like the twenty-three in the lot over there), you need to use something like all of these, all of those, or just all of the.

✔ 2. Set all (of the / of these / of those) cars' colors to red.

This uses the plural possessive. It talks about the colours that are possessed by many cars. Depending on what set of cars you are referring to, you would limit it by applying one of the determiners in parentheses (if any).

This is the meaning you have said you are trying to express.


Then there is this:

5. Set all car colors to red.

Here, car colors is a noun phrase. It's not talking about possession, but simply limiting the possible colours that a car is capable of having. (For example, somebody could raid the global supply of car paint and destroy every colour except for red.)

As an attribute of multiple objects, where an attribute is something possessed by the objects, this would not be the sense you are looking for. But I wanted to mention that this construction is correct, if you are not trying to express actual possession.


That leaves the following sentences.

✘ 1. Set all cars colors to red.

As a possessive, there is no apostrophe; as a noun phrase, only the last noun should be plural.

✘ 3. Set all car's colors to red.

As a possessive, it describes a single car, not multiple cars.

✘ 4. Set all cars' color to red.

As a possessive, this describes multiple cars jointly sharing a single thing. In practical terms, this makes no sense. However, it's possible (although very unlikely) that you're talking about the concept of colour that cars can possess rather than the actual instance of colour that they actually do possess. Although it would be unusual to think of it in this way, it's possible. In other words, it could be thought of as a mass noun here—similar to this: make all sinks' water pure. However, that's contrived and more theoretical than practical.


Of course, there are ways of referring to multiple cars while still using only singular words (context would determine exactly how many cars were being referenced):

Set every car's colour to red.
Set each car's colour to red.

Or, for the non-possessive:

Set every car colour to red.
Set each car colour to red.


You want to set the colour of multiple items and so you must use cars, the plural. To indicate possession (the colour of the car), you need to have the apostrophe. But since you have a plural ending in "s," you can omit the "s" that would normally follow that apostrophe.

That gives you: Set all cars' colours to red.