4 ms·
My guess: the concept of "a length of an array" is the thing you use to think with when you need it. Why? Because it is a single entity(through abstraction).
by petra 4y ago
My guess: the concept of "a length of an array" is the thing you use to think with when you need it.
Why?
Because it is a single entity(through abstraction). And because it is a single entity and you use it a lot, it gets connected to many other concepts.
And because you've solved problems with it,it has more emotional value.
This means you can more easily retrieve it and it has more "meaning"/context to you.
list.length gets used less often and it just a concrete implementation of the concept so maybe it's just linked to the concept.
And it's also more complex to remember and use because it's made of 10 items.