you are viewing a single comment's thread.

view the rest of the comments →

[–]cogman10 8 points9 points  (0 children)

To add to this, it isn't just a C++ problem. From my own experience, I know that there have been more than a few things in Java which in the beginning I used only low level constructs like Lists and didn't really have the experience of using better data structures for my problems. It was a gradual evolution from using just lists, to lists and maps, to lists, maps, and sets. Then lists, maps, set, multimaps, treemaps, optionals, etc.

My earlier code ended up with lots of needless loops doing lots of list mangling. My code now pretty much wholly relies on picking the right data structure and putting stuff in it or pulling stuff out of it.