Generic Function vs Manual Rewrites
template<typename T> T min(T a, T b) { return a < b ? a : b; } manually rewriting the same function for every type there is
A programming meme contrasts using a generic C++ function template with manually rewriting the same function for every possible type. The joke is that generic programming is the obvious efficient solution, while the bottom panel shows the programmer overwhelmed by an absurdly tedious alternative. It is used as a reaction to unnecessary repetition or refusing to use abstraction. EN: A programming meme contrasts using a generic C++ function template with manually rewriting the same function for every possible type. The joke is that generic programming is the obvious efficient solution, while the bottom panel shows the programmer overwhelmed by an absurdly tedious alternative. It is used as a reaction to unnecessary repetition or refusing to use abstraction.
- Type
- image
- Size
- 599×443 · 45.2 KiB
- Mood
- саркастичный
- Language
- en
- Added