Anyone coming from other languages with generics will need no further explanation- generics offer a great way of simplifying a code base and speeding up development.
For those unfamiliar, a generic data type is one that allows you to code a function template without specifying the data type it will process. This allows you to write an algorithm once but use it to process many different types of data. As an example, say you wanted to write a math function to work on any numeric data type without casting; this is a lot of work and you would have to rewrite the function for every numeric type and create a polymorphic boilerplate to call it. Much easier and more maintainable to write it only once for thos of us without 5 pairs of hands.
I am aware this post is in danger of being marked a duplicate. I just think I'm stating the case differently from the others- vote for this or vote for one of those I don't care- better still vote for them all!
Similar-
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.