A buddy of mine asked about my opinion of Java 8, now that the spec has been finalized. I can't help but feel that Oracle dropped the ball pretty hard on this release. If you look at the list of new features in Java 7 and compare that to Java 8, you will notice a distinct lack of new features in Java 8. Here are a few that I wanted to comment on:
JSR 310: Date and Time API
I understand some people's frustrations with Java's current Date and Time API. This is a welcomed change, but I personally don't mind the current API.
JSR 308: Annotations on Java Types
I have never been happy with Java annotations. I always felt they could have been done a lot better. Although JSR 308 does add some much needed annotations (@ReadOnly, @Immutable), I feel like it still fails to satisfy. In my opinion, annotations should help provide Class invariance, but Java annotations were never good enough to provide that really well. Also, I still feel that annotations should have code-generation abilities. I should be able to annotate a class member variable, and the getters/setters should be generated at compile time. The new annotations still don't deliver.
JSR 335: Lambda functions
Lambda functions can be very helpful. I am excited to finally have them, but the implementation seems reminiscent of Python's implementation, which I didn't like. Python seems one step better, though, since it supports function pointers, where Java still doesn't support function pointers. Maybe its because I can't find any good examples, but Java's implementation doesn't look like it can support complex lambda expressions/functions.
JSR 223: Project Nashorn
I am excited about this. If I understand it correctly, this is a new Javascript engine that makes use of new JVM features that were introduced in Java 7. This should allow Javascript execution to be faster while using less memory (especially in the code cache). I have done a lot with Rhino, so I'm happy about this change.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.