3 ms·
I often see this kind of attitude expressed on internet forums as if it is the right answer in every situation. All of the options expressed here will usually
by Negitivefrags 14y ago
I often see this kind of attitude expressed on internet forums as if it is the right answer in every situation.
All of the options expressed here will usually be built in to the language, there is no extra implementation cost at all. Pick a vector, sorted vector, set, map or hash-map.
Knowing and picking what is usually correct will not take more than a few seconds of extra thought.
Your attitude leads to "generally slow" programs that are the hardest to make faster.
- rhizome 14y agoYour attitude leads to "generally slow" programs that are the hardest to make faster. Really? Even if they have proper encapsulation, separation of concerns, etc. (even unintentionally)? "Refactor the function or method later if necessary" is not the worst way to write software, and in fact I would say it's the dominant technique even when initial attempts are optimized.