Skip to content.

Manageability

Sections
Personal tools
You are here: Home » blog » archive » Extensible Java Compilers

Extensible Java Compilers

20021112214809

James Strachan writes:

After 5-6 years development with few changes to the underlying language I think the Java world could benefit from some similar syntax sugar. Though the Java platform is far more important than a few bits of syntax sugar (e.g. I really don't miss generics that much), it might be nice to start thinking of what enhancements to Java we could consider.

That gets me thinking, after all these years why has the Java language changed so little?

It couldn't have been because of lack of innovation.  Pizza (circa 1997) introduced Generics, Functors and Class based pattern matching.  Nice and MultiJava introduced Multiple Dispatch. Others have introduced Closures, Generators, Continuations and a whole lot of other constructs to the Java language (see the Extended Java section).  Though, the most interesting innovation are those with extensible compilers, particulary based on Hygenic Macros (Maya and JSE) or Alegbraic Types (JaCo).  With extensible compilers innovation isn't be held back by a standards process, rather language constructs would  be easy to build, use and test, and possibly standardization may come later.

Now, extensible java compilers can easily lead to a Tower of Babel scenario.  However, we can draw some inspiration from the work done by DrScheme. DrScheme is a programming enviroment where you can choose selectively a "language level".  A beginner shouldn't have to be exposed to hygenic macros or continuations, at the same time experts shouldn't be restricted from using them. 

It's not only the syntax of the language that improves productivity, its also the libraries and the programming environment.  We do know now that the Java language has the most extensive libraries in the planet today.  We also do know that Java has the most sophisticated programming environment out there in the form of Eclipse, IDEA or JBuilder.  That is, code assists, quick fixes, tooltip documentation, language sensitive searches and refactoring.  The moment you get used to any of these features, you can't work in any other way.  That's the achiles heel of languages like Python or Ruby.  Clearly both languages are easier to read and write than Java, but they lack the environment, if you spend most of your time digging through the reference manuals, then its not going to be as productive.  What I'm getting it is, it doesn't matter how nice the syntax of your language is, its just simply not going to be as productive an environment as what you find in the Java world.  Watch a guy code using Eclipse and you'll get the picture. 

So, that answers it, Java has changed so little at the syntax level because its changed so much at the library and evironment level.  You aren't going to need it (i.e. YAGNI ). However, if you got an extensible java compiler, some kind of standardization of language extensions and a kick ass development environment to support it, then its game over.  Forget about Python, Ruby or C# the language race may not even be close.

Created by admin
Last modified 2003-07-30 04:14 PM
visitors
reading
 
 

Powered by Plone

This site conforms to the following standards: