4 ms·
First on Java generics: I don't understand all the complaints about generics anyway. They're very useful and not really hard to understand, basically. Besides t
by abp 16y ago
First on Java generics: I don't understand all the complaints about generics anyway. They're very useful and not really hard to understand, basically. Besides the readability gain, you get compile time errors, or even hints in an ide for types that don't fit compared to casting from object to the type you expect to get. Also APIs are a lot more readable and expressive when you don't have a bunch of methods taking objects as parameters.
I think the "subsetting the language" approach is a red herring.
I don't think that the compatibility in syntax is meant for subsetting, but merely for approaching a language one step at a time. When you learn programming in a new language that has this advantage, you can start right away, using familiar concepts and learn more features as you need them. You can grow into the language.
At least that was my approach in learning languages like VB.Net(oh yeah..), C# and Java for example. The specific advantages of each language come in when i try to simplify things or do something in a better way.
Making the wall merely a ramp you can go up slowly instead of climbing right uphill.
Also I'm interested in the way some programmer could/should be able to learn a whole language in depth before getting his hands dirty on a real project, working in a company.
- quicksilver03 16y agoI think that you lose readability with Java generics, rather than gain it, because of the ugly angle brackets which stand out far too much visually with respect to the other glyphs. By the way, I think the same about the "enhancements" proposed for Java 7 and 8, regardless of their technical merit.