For some reason, I currently feel like posing a question: What are your thoughts on Generic Programming?
If you don’t already know, Generic Programming is when the programmer writes a single function or set of functions capable of being used with a number of then unspecified types.
An example in pseudo-code:
void print_array(T array): for_each element in array: print element + " "
Note: The syntax is not language-specific. This is pseudo-code. Don’t compile this!
So, for the C++ programmers out there, or anyone else with an opinion on the Generics, what are your thoughts?
Personally, I find it convenient, but it can easily be a waste of time if you know your code will only use, for example, a specific type, like an array of