Will Java 7 Erase Erasure?

I just got back from a great NYC Java SIG event.

The esteemed adjunct professor of computer science at Polytechnic University in Brooklyn and author, Elliotte Rusty Harold, gave an interesting presentation on Java 7 and Beyond.

The slide deck will be posted on his web site soon.

Some of the new Language and JVM features being discussed for Java 7 are:

  • Superpackages
  • Language level XML support
  • JavaBean property support
  • BigDecimal operator support
  • Strings in switch statements
  • Comparisons for Enums
  • Short instance creation
  • Closures
  • Type Literals
  • Reified Generics
  • Java Kernel
  • invokedynamic
  • More script engines
  • Tiered compilation
  • Miscellaneous ideas

You can read more about it here.

The one feature that surprises me most is Reified Generics. The Erasure versus Reification issue has been a hot topic in the industry.

Java implemented Generics using Erasure which means that the generic type info is not available at runtime. Reified generics is the alternate approach where the generic type info is available at runtime.

It’s interesting because reification is the long standing Microsoft .Net approach. Whereas erasure is the Sun Java approach.

Neal Gafter writes about it here. Bruce Eckels has a 4 part article on the topic here.

The big complaint with Java Generics is that it’s too complex.
This Java Generics FAQ is 425 pages!

Java 7 is still evolving but it’ll be interesting to see if it eventually adopts the Microsoft way and erase erasure.

Advertisements

Tags:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: