J2SE1.5 Easy New Language Characteristics of Developing: Joshua Bloch Interview
Original http://java.sun.com/features/2003/05/bloch_qa.htmlby janice j. heiss
May 8, 2003
As expected Java 2 Platform, Standard Edition 1.5 (J2SE 1.5) beta version is released in late 2003 (well-known Tiger project), developers are very concerned about the upcoming new changes. No one can explain the J2SE 1.5 more suitable than Joshua Bloch. He is SUN's senior engineer, a system architect of the core working group of Java platform. He successfully designed and achieved award-winning Java Collections Framework, Java.math package, and its design and implementation of other parts of the Java platform also contributed superior contributions. He published numerous papers and published a book "Effective Java Programming Language Guide", which has obtained the Jolt Award for Software Development Magazine. He received a Ph.D. in the University of Carnegie-Mellon. Today we exchange, let's take a look at the future of the Java programming language.
The Tiger project developed attempts to enhance J2SE, making the Java program clearer, smaller, safer, and easier to use without losses compatibility. Can you tell us how easy it is easier to use in the J2SE platform?
The new language features have a common feature: they all contain some universal syntax and provide language support. In other words, they transferred the responsibility of writing and semantic code from programmers to the compiler. Because the source code gets rid of semantic related code, it is easier to read and write. At the same time, the compiler is not a programmer, which will never make mistakes, so the new code can be more likely to get rid of BUG.
In addition, the overall function is greater than the sum of the components of the whole, and all new features are well considering other parts when designing. They coordinate together, significantly improve the performance and safety of the language.
You estimate, which change is the most difficult to let developers adapt? Also, what kind of adjustment is developer need?
I hope that all new features will not make developers feel difficult to adapt. However, if I choose one from it, then I think it is a generic technology. Because developers must provide some additional information in the statement, not just say:
List word = new arraylist ();
You have to write this:
List
The advantage of this is if you want to insert an other object rather than string, you can find and fix your mistake when you compile. If you don't use generic technology, only when your customers complain about the software Down they rely on, the reason is what type of transformation exception (ClassCastexception), you might find this bug in your program.
Another advantage of this is that when you take out an element from a collection, it is not used as a forced type transfer. Originally, you will write this:
String Title = (String) Words.get (i)). TouPpercase ();
It's very simple now:
String title = words.get (i) .touppercase ();
Java 2 Platform, Standard Edition 1.5 (J2SE 1.5) Beta version will be released in late 2003, these changes have passed JCP audits. Two questions: How do I ensure that the current idea will reflect the final change? How do developers participate in this change process? Experts from JSRS (14, 201, and 175) will push the current draft, but I am convinced that the general contour will not change too much in the final version. Of course, it will eventually be an expert group to say.
The best way to participate in developers is to read the latest drafts and send comments and recommendations to relevant expert groups. The latest generic draft can be found in the address below:
http://jcp.org/aboutjava/communityProcess/review/jsr014/.
You can also download a preview version of the compiler, try to understand generic technology: http://developer.java.sun.com/developer/earlyaccess/adding_generics/.
Early drafts of other recommendations are here: http://www.jcp.org/en/jsr/detail?id=201. Please pay attention to the bottom of this page, at the bottom of this page.
There is currently no draft of JSR-175 (metadata) metadata, but it will be available soon. For further information, please find it here: http://www.jcp.org/en/jsr/detail?id=175