To view parent comment, click here.
To read all comments associated with this story, please click here.
Generics was implemented for marketing purposes (even Gosling was against it). In 2005, you have to have "generics" in the feature list because It sounded cool and trendy (and C# had it).
Now, It's the same story with Lambda, Closures and so on.
Google uses java 1.4 for Android for a reason: They're smart. Simplicity and coherence are better than any other feature.
IMHO If you want syntactic-sugar then use an scripting language like Groovy, JRuby or a DSL!!!
Generics, as implemented in C#, are a powerful language feature which reduces the number of lines of code needed, improves type safety, increases code speed and decreases memory usage.
Of course in Java, generics is implemented as syntactic sugar, and only manages to reduce lines of code needed but doesn't actually do anything beside that. They should have made a clean brake.
What Gosling thinks is IMHO irrelevant. He created a language without unsigned datatypes, enums or generics although programmers requested them. Also the whole strict FP thing is a mess. That you characterize Java 1.4 as C of Object Oriented Programming is baffling to me. C is elegant in its simplicity and never tries to dumb anything down, Java does exactly the opposite.




Member since:
2006-05-04
Can you explain that?
As long as they put new generic classes in new namespaces, and leave the old non-generic classes as is, you would preserve backwards compatibility, no?
That is something that i never understood. I like generics, but i do think that in Java it is implemented as a hack. Not really as part of the language, but more something like a preprocessor for the compiler.