X
Business

Sun updates Java for geeks

Sun will recognize the two most popular developer requests by adding assertions and generics -- called the geekiest language features around
Written by Deborah Gage, Contributor

Sun Microsystems has acceded to developer requests and will make two additions to the Java language, a move it has resisted for years.

In a keynote at Sun's JavaOne developer conference on Tuesday, Java creator James Gosling announced that Sun will add assertions and generics to Java because they are the two most popular developer requests. The changes will be available in Version 1.4 of the Java platform.

Both changes will result in more reliable Java applications. Assertions lets developers test assumptions they have made about their code before deploying it. Generics, which Gosling called "the geekiest language feature around," defines the parameters of Java containers by their contents. If, for example, there is a jar of olives, Gosling said, generics lower the odds that developers would put walnuts into the jar by mistake. "You can declare a Java class which is parameterized by type, and you can declare a variable which is an instance of that class parameterized in a certain way. A map that maps strings to employees is an example."

Generics is controversial and has been widely debated inside and outside of Sun. Gosling said the concept is so complicated that no two developers could agree on exactly how it should be implemented. He and Sun Chief Scientist Bill Joy "got as close to physical violence as we've gotten," he said, because Joy wanted to slip Java for two or three years until Sun figured out generics. However, developers converged on an answer about two years ago, and then Sun waited while the issue wended its way through the Java Community Process. Gosling said reliability is critical to Java because it raises developer productivity, allowing them to "spend less of their lives fixing broken applications."

Developers have requested many other changes to the Java language. Gosling created a Web site a couple of months ago with a laundry list of all the changes and said he considered creating "a kitchen sink language and whacking it into a prototype compiler." But he will not commit to other changes because Java must be kept simple, particularly considering the variety of developers using it. Sun estimates there are 2.5 million Java developers worldwide.

Gosling shared the stake with Nokia President Pekka Ala-Pietila, who committed to shipping 50 million Java phones by the end of 2002 and over 100 million by the end of 2003. Ala-Pietila announced an entire product line based on Java, with some phones running Personal Java on top of the Symbian operating system and others using embedded Java. Borland will provide tools to create applications for the phones, and Motorola and Nextel announced on Monday that they are working on enabling phones to wirelessly download embedded Java applications.

However, Ala-Pietila said that changes to Sun's Java Community Process are critical for Java's future health. Sun created the Java Community Process a few years ago as a way to let developers participate in Java's evolution while retaining control of the technology, but IBM and others have complained repeatedly that the JCP is not open enough. Ala-Pietila wants wide rights to implement code created under the process and a wide distribution of intellectual property. He declined to elaborate further.

In a press conference following the keynote, Sun VP Pat Sueltz, who's in charge of Sun's software strategy, said Sun will make the changes to the JCP and continue to listen and learn from its developer community. On Monday Microsoft President Steve Ballmer called for a closer relationship with Nokia while on a trip to Finland. Ala-Pietila did not address the Microsoft issue. But Gosling said Microsoft had "terrorized the industry" and created "a conspiracy of silence" of vendors that Microsoft had abused. Gosling said the U.S. Department of Justice's investigation of Microsoft has broken that conspiracy and allowed "the right social things to happen."

For complete business coverage, see ZDNet UK's Enterprise Channel.

Have your say instantly, and see what others have said. Click on the TalkBack button and go to the ZDNet news forum.

Let the editors know what you think in the Mailroom. And read other letters.

Editorial standards