4 ms·
"Users": sounds like an array to me "UsersMap": doesn't add much value, what are you mapping? "UsersById": now this is my style
by janpot 8y ago
"Users": sounds like an array to me
"UsersMap": doesn't add much value, what are you mapping?
"UsersById": now this is my style
- nickm12 8y agoAgreed. I think the article is wrong to imply that the type adds no value. Even if you have typechecking, the names of variables help you understand code. Also, why should we compare variables to pets versus the many other things in our life that we do refer to by their type? I don't have proper names for my filing cabinet or office chair.
- Noumenon72 8y agoThat's good style. The important thing you will get out of the map is at the front of the variable name, and there's a less important little qualifier "byId" to help you understand how the data is structured.