Martin Probst's weblog

Java 3

Tuesday, May 20, 2008, 07:23 — 0 comments Edit

Ola Bini has posted an interesting list of features he’d like to have in a hypothetical Java 3.

There are some points I definitely wouldn’t like, such as “No primitive arrays.” - I know they are a pain to have in the type system, but getting rid of them and thus making it nearly impossible to implement custom data structures is really not the way forward. One should try to come up with a primitive collection-like data structure that better fits into the language and type system, but dropping them altogether is not a good idea.

What I’d really like to see in Java 3 are two things: more syntactic sugar for common things, some important platform features, identifiers as first class citizens, a structured way out of the type system, and named parameters. Which is roughly the order of difficulty in implementation and unlikeliness of having these features actually appear :-)

Maybe one should start a project to actually try this stuff out. I know that many people have stated that Ola’s list is just a description for a subset of Scala (or some other language), and they are right, in some sense. But this is an important point: I don’t want all the complexity of Scala. And I don’t like their implicits, the “object” feature - which is syntactic sugar for something that shouldn’t be there at all, static must die -, the sometimes cryptic syntax, the weird rules about operator/method precedence, and so forth. This deserves further qualification (a lot), but I’m just not happy with Scala.

I guess one should also look at the work done by Gilad Bracha (Newspeak) and possibly Ian Piumarta/Alan Key in their COLA stuff. The former, because Bracha introduces some really nice and useful features, the latter just because it’s totally awesome :-)


No comments.