<< Embedded Derby on a socket, revisited | Home | Mysterious injection problem... >>

Java VIII

Following Apple's lead in switching from positional to roman notation in version numbers, Sun announced today that the successor to the upcoming Java 7 will be called "Java SE VIII" instead of "Java SE 8". The announcement also revealed some of the new features that are planned for this version. I will summarize the most important ones:

Syntax extensions

The new "intrude" statement provides convenient access to an object's private members. Here is a usage example:
    Object x;
intrude (foo) {
x = foo.privateMethod();
}
Outside the block, the variable x can be used just as if it had been assigned from a regular public method. This results in much shorter code than the old technique of using "java.lang.reflect" to accomplish the same thing. To circumvent possible abuses of this new feature, it is recommended that any sensitive private data is stored as RFC4648-encoded text strings wrapped in XML documents that encrypt the data according to the W3C XMLENC-CORE standard.

New annotations

In response to the increasing demands for higher programmer productivity, a new annotation is provided that makes it easier to get away with quick-and-dirty code:
    @Shameless
public void foobar() {
...
}
When this annotation is used, the -Xlint option to javac will be completely disabled during compilation of the annotated code block. Also, some "slack" will be allowed for indexing outside array bounds. Exactly how much slack there will be has not yet been finalized, but the intent is that the programmer should never have to worry about trivial fence-post errors.

Memory management

New state-of-the-art memory management. For environmental reasons, garbage data will in the future be viewed as a valuable local resource rather than "waste" that has to be managed and removed by a centralized service. Traditional garbage collection has been deprecated in Java VIII and in its place there is an assertion-based API contract that forces all consumers of heap objects to recycle used objects back to their producers. This is technically done via a new signature for the "java.lang.Object.notifyAll" method.

All this is very exciting, and I am looking forward to the planned alpha release of Java VIII which is preliminary scheduled for April 1, MMXI.


Avatar: Per Lindberg

Re: Java VIII

There is also talk about increasing the number of Access Modifiers, too.

+ global - reachable from another JVM on the same node
+ cosmic - reachable from any JVM on the Internet

For details, see the Sun white paper 'The Six Modes of Java VIII'.

 

Avatar: Anonymous

Re: Java VIII

Throughout the great scheme of things you actually receive a B- just for hard work. Where you actually lost me personally was in the specifics. As as the maxim goes, details make or break the argument.. And it could not be much more correct right here. Having said that, permit me tell you what exactly did give good results. Your writing can be highly convincing which is most likely why I am taking the effort to opine. I do not make it a regular habit of doing that. Second, despite the fact that I can notice the jumps in reason you make, I am not really certain of exactly how you appear to connect your points which produce the conclusion. For right now I will, no doubt subscribe to your point but trust in the future you link your facts much better. 88))

News on the forthcoming Java VIII release

The new intrude block obviates the need for using reflection in common situations. ...

Add a comment Send a TrackBack