But I see a lot of interesting similarities between the things AOP touted and the things being marketed about dynamic and functional languages (like Ruby, Groovy, Scala, etc). These languages provide more flexibility about how you structure your code. They let you do things like interception and proxying more easily (via blocks), weave the same function into many use locations (via closures), dynamically modify classes, objects, etc (via mixins, traits, whatever), and more. Java 7 seems to be pulling at the coat-tails of this feature set, with the slow but steady progress on closures, extension methods, and type inference. But when you look a little closer at the proposals for these, they’ve kind of gone through the looking glass to fit into Java’s static typing and backwards compatibility requirements. And what’s on the other side is a little weird. The thing is that when I look at Ruby, or maybe Groovy or Scala is even better since they’re closer to Java, these languages have sets of features that support each other. Closures are great but without dynamic typing, man they are ugly in Java. Scala addresses this through some aggressive type inference but even there you still see those same ugly static types on the closures. I guess if I had to summarize this rambling thought, it would be that we as developers have a need for more flexibility, more power, and better abstractions, and Java is not satisfying this need. And because of that, some developers are jumping ship for more flexible languages. Personally, I really like Java and I still enjoy writing code in it even though I occasionally find it frustrating or annoying. Maybe I’m too spoiled by the libraries, the tools, and the wonderful portability of the JVM.
Read Alex Miller's complete post: http://tech.puredanger.com/2007/12/14/through-the-java-looking-glass/