3 ms·
I used to do that, but now I try to think in terms of the abstraction "list" and "array", and not worry about the underlying data structure unless I'm specifica
by radarsat1 15y ago
I used to do that, but now I try to think in terms of the abstraction "list" and "array", and not worry about the underlying data structure unless I'm specifically thinking about efficiency. For example there are multiple ways of implementing lists and arrays that have similar interfaces but different efficiencies for insertion/sort/search, etc. So basically the dichotomy you propose is just "too simple," it doesn't cover all the options and combinations that a programmer may need to think about.
- DanWaterworth 15y agoI didn't say that it was a dichotomy, actually I tend to think of the space as roughly split into three: lists, arrays and annotated/sorted trees. Lists and arrays are really common though, so I think it makes sense to make it easy to refer to them using short words.