4 ms·
I think it works here because you're in a context where there's just one collection. So you don't really have to remember what c means, you can see c.size() and
by burkaman 11y ago
I think it works here because you're in a context where there's just one collection. So you don't really have to remember what c means, you can see c.size() and think "this is the size of the collection", because in this context there's only one thing you could be taking the size of.
If there were more than one collection, or we weren't using it in a way that makes it obvious it must be a collection, I would want a better name.
- chimprich 11y ago> you can see c.size() and think "this is the size of the collection" If you see collection.size(), you don't even need to think; the meaning is right there in your field of vision and you don't need to dedicate one part of your extremely limited short-term memory to remembering what c stands for. I can't see any advantage to shortening it to c, apart from saving a trivial amount of typing.