| > This is simply not true. Doug Lea, the author of java.util.concurrent, and of ForkJoin in particular, was one of the main driving forces behind lambdas; he requested them about 7 years ago precisely for those bulk operations. The same Doug Lea rejected function types way back then in favor of CICE. How is this in any way disagreeing with what I said? Did you actually look at Doug Lea's reasoning back then? I don't think he would defend any of his claims today.
Back then, the issues caused by not having function types just weren't anticipated. This would be obvious if one followed the appropriate mailing lists where this was discussed in depth. > Already back in 2007-2008 it became clear that function types are a bad fit for Java. Java's designers explicitly mentioned currying, general functional-style programming, and user-defined control structures as things they wanted to avoid. Beating down your own straw men seems to be your hobby, I guess? > Again, not true. Java's designers are extremely focused on performance, and did not "realize" all of a sudden boxing has a non-negligible impact on performance. No, they were just betting the house that the JVM engineers would save their asses, but as we know that didn't work out so well. They didn't really have a plan B, so they started to manually duplicate code for some primitive types. > Again, the idea is always do the least "powerful" thing possible that will give you the most benefit. This hasn't worked out at all and is one of the reasons why Java is incredibly hard to evolve. One just can't keep piling half-assed ideas on top of each other forever. Anyway, I'm not sure why you are so defensive. Yes, Java will ship with some kind of lambdas, but they will be inferior to pretty much anything out there in terms of usability, readability, maintainability, performance and will be a major pain point when evolving the language in the future. Why not just accept it and move on? |
Because it's not true. I don't know if you've seen the lambda performance benchmarks but they're pretty darn good. I don't know what you mean by "usability" but some uses of lambdas in other languages are not a right fit for the Java philosophy. When it comes to maintainability, lambdas are great. Method handles don't enforce any particular implementation strategy, and the current language does not even preclude introducing function types in the future if it proves to be as big a pain point as you claim; OTOH, introducing function types now would have made it pretty much impossible to go back.
Now, let me be clear: I am not saying Java is the best language out there (I don't think such a thing exists). I am not even saying it's the best language for the specific goals it took upon itself. All I'm saying is that given its unbelievably huge adoption, backwards compatibility and philosophy, its maintainers are doing a pretty good job.