Beyond Java - Bruce Tate [7]
I've also noticed that other, more dynamic languages rarely use things like AOP or dependency injection. Those features solve critical problems in Java, but more dynamic languages like Smalltalk, Python, and Ruby don't have the same level of pain.
I'm not saying that these are bad technologies. They absolutely destroy the closest heavyweight alternatives, in terms of simplicity and power. They're solving hard problems. It's just that your mind can learn only so much, only so fast. Java's rapidly becoming an effective tool set for elite developers. Hey, maybe that's where programming is going. I'm just saying that this unnatural stretching is one more clue that it may be time to take the temperature of the water around you.
Language evolution
Java 5 is strongly touted as perhaps the most innovative major release of Java in half a decade. I do agree that it's going to have a significant impact. I'm not at all convinced that all of the impact will be positive. I regularly attend a conference called NoFluffJustStuff. The experts at the conference sit on a panel and answer questions. One of my favorite questions deals with new features in the language. The whole panel agrees that generics, as implemented, are a bad idea. That usually shocks the audience.
If you think about it, the Java generics Java Specification Request (JSR) introduces a whole lot of syntax to solve a marginal problem with no corresponding change to the Java virtual machine (JVM). I'm guessing that the typical Java developer rarely gets a class cast exception. And there are plenty of opportunities. Most of the objects in a typical Java application are usually in collections anyway. Whenever you take them out of the collection, you've got to cast them from Object anyway. At that point, type safety gives you about as much protection as a lap belt in a burning, plummeting 747. Yet, the generics syntax is invasive, and the implementation is worse. In an age when more and more experts assert that dynamic typing leads to simpler applications and productive programmers, Java developers are learning how to build stronger enforcement for static types.
Add questionable use of legitimate features like annotations , which can completely change the semantics of your program without conventional code, and you've got all kinds of possible trouble. Does the increase in power offset the increase in complexity and obscurity? Annotations bring a completely new tool, and in many ways a programming model, to the Java community. I don't know enough to say whether we'll learn to use annotations well, but I do feel comfortable predicting a few major disasters while we learn.
I don't want to tip my whole hand too early. I'll talk more about Java limitations in Chapters 3 through 5. Right now, just understand that Java is experiencing some real problems. They may be growing pains of youth, or they might be arthritis in Java's October years. I just don't know, but the temperature is rising fast enough to get my attention.
What's Good Is GOOD
I don't mean to say that Java's bugler is finishing the last few notes of "Taps" as you read this paragraph. Instead of spewing doom and gloom, I'd rather tell owls and ostriches alike to pick up your eyes, and watch and listen. Look at it like this: conditions are ripe for a credible alternative to emerge. At the time of printing, Java's still the king of the hill. In fact, powerful and compelling motivations still drive new investment in Java:
The Java community is vibrant. You can find talent to attack hard problems in Java. You