Timeline for Should I give an object that holds multiple objects of the same type a plural name?
Current License: CC BY-SA 4.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 27, 2023 at 14:46 | history | edited | Ewan | CC BY-SA 4.0 |
added 1 character in body
|
Jan 16, 2020 at 16:01 | comment | added | Ewan | the problem with employee, flock etc is that they have implications more than being a collection of that type. Company.Employees may include people no longer employed by the company. Farm.Flock is more than just a list of sheep. | |
Jan 16, 2020 at 15:56 | comment | added | user949300 | I use datum / data all the time. And person is arguably a bad term anyway, something more specific like "user" or "employee" would be preferred. Can't say I've ever worked on herding software, but "flock" is an obvious plural of sheep. | |
Jan 16, 2020 at 15:43 | comment | added | yaserso |
This answer helped me the most, as it put into thought that a collection can have its own distinctive name. For example, I could've named it mapRiders . Adding a name helps, but also there is the option to give the object a more distinctive name as you've said, which was list. I'd imagine a group of fish could be named fishSchool , and sheep as sheepHerd . Adding a prefix or affix might help determine whether it is an array or an object.
|
|
Jan 16, 2020 at 15:38 | vote | accept | yaserso | ||
Jan 16, 2020 at 15:22 | history | answered | Ewan | CC BY-SA 4.0 |