memesearch
The C++ Container Orthogonality Joke

The C++ Container Orthogonality Joke

Download Find similar pictures
Text on the meme
I got a complaint that std::list is slower than std::vector. In that case, simply do `#define list vector`. But remember to test first and avoid premature optimisations!This is the beauty of the orthogonality in stl, you can often swap out containers just like that. Item 2: When you have a list of elements, prefer std::list. "vector" is a mathematical concept, and std::vector should only be used for those. This leads to more expressive, domain driven code! #cplusplus #cpp #affectivecpp
What it means

A screenshot shows a humorous C++ programming post suggesting redefining `list` as `vector` to solve a performance complaint, followed by a contradictory post recommending std::list for lists and std::vector only for mathematical vectors. The joke mocks contradictory programming advice, overconfident abstractions, and premature optimization. EN: A screenshot shows a humorous C++ programming post suggesting redefining `list` as `vector` to solve a performance complaint, followed by a contradictory post recommending std::list for lists and std::vector only for mathematical vectors. The joke mocks contradictory programming advice, overconfident abstractions, and premature optimization.

Objects
Tags
Sources
Type
image
Size
720×609 · 69.9 KiB
Mood
sarcastic, absurd
Language
en
Added