Is JDK 1.5 too clever?

I read Matt’s latest blog with some interest, yet, in the back of my mind, I couldn’t help wondering if Java is becoming too complex, a little too clever, in places. Is Java in danger of entering the C++ realm?

In the C++ projects I worked on, there would be some on the team who would know how everything worked – how the compiler found templates, conversions, when temporaries were created, etc, etc. These people were language lawyers who slept with the ARM under their pillow. OTOH, there would also be that part of the team who didn’t really grasp clearly how many things worked – how auto_ptrs worked, how the handle-body templates worked, whatever it may be. Ignorance is not always bliss and such projects, I feel, would be particularly fragile during their maintenance phase.

Of course, there will always be things that are complex in a language. There will be people who get it and people who muddle through. Classloaders probably fall into this category from even early versions of the JDK. As a language’s complexity increases, I feel the gap between the the two groups of people grows and the systems they work on become more susceptible to the unintended impacts of changes made to the system. Even the language lawyers sometimes slip and are surprised at what the compiler would do.

Most of this is just based on my gut-feel. I haven’t yet had the time to look in detail at JDK 1.5. However, when I see someone as cluey as Matt say “Now, WTF does that mean”, I wonder if that is a warning sign.

Overall I suspect that generics will be a boon for Java developers but some of the more clever constructions will just not get used that much, at least by the bulk of developers.. How many will really understand what

Enum<E extends Enum<E>>