Function Template Specialization in C++
friedo writes "About.com has an excellent two-part article (Part 1, Part 2) by Eric Nagler, author of "Learning C++," about "specializing" function templates in C++. "Rather than specifying an explicit type of all of the arguments or the return value in the definition of a function, placeholders are used. This reduces the need to create and maintain multiple copies of a function for different parameter types. But sometimes, it is not possible to write a single function template that works efficiently or even correctly for every argument type. It is in these cases that function template specialization is useful.""
Why is this newsworthy ? Partial specialisation of C++ templates and function templates are C++ 101 - there's nothing new or interesting here. If you're C++ coder and you don't already know about this, then you shouldn't be in your job.
Are we going to repeat this for other languages ?
Seriously, go and read Modern C++ design, because that's the least of the syntactic salt of C++ templates. It may be a powerful feature, but it's so encrusted with syntactic baggage that it often obscures the actual logic of the program. For the absurd conclusion to the horrors of template syntax, check out the Loki library by the author of the aforementioned book. This library, recall, is supposed to make powerful constructs easier to work with...
Incidentally, to the idiot moderator, the preceding example was ocaml, not BASIC.
I've finally had it: until slashdot gets article moderation, I am not coming back.