Generics Considered Harmful
By Adrian Sutton
Ken Arnold talks about the complexities of generics and how he doesn’t feel they provide enough benefit for the complexity they add. I have to agree, most people probably only understand the basics of generics and not the full spec which is a recipe for great confusion and the number and type of bugs that generics prevents really doesn’t give much benefit.
It’s odd that there’s such a push towards scripting languages with no compile time type checking at the same time the Java crowd are pushing for stricter compile time type checking. I can honestly say that in all the perl, PHP and Ruby scripting I’ve done that not once have I ever had a bug caused by having the wrong type of data in a variable. Not once. You never should if you have clearly defined what each variable’s purpose is and if you haven’t done that you’ve got problems that extend way beyond what a compiler can help you with.
UPDATE: Whoops, forgot the link.