I had a Java dream last night

I had a dream that Jonathan Schwartz has called me on the phone and asked for an advice on Java future. This is what I remember hellip;

Jonathan. Hey Yakov, I “m sure you “ve heard about our great results in the hardware arena. But I “d like to hear your opinion on how to proceed with Java.

Yakov. Jonathan, it “s an honor. How can I help you?

J. We are planning lots of new language features to be introduced in Java 7 (closures, data binding in Swing and more)…

Y. I’ll tell you what I think. But please answer my question first, what “s this thing with outsourcing Java? Why? Do you really believe that it “s the right thing to do?

J. To put it simple: peer pressure. Everything is open sourced these days, you have to go with the flow hellip;

Y. IMHO, this is a mistake. I do not think Sun needs to go through this pain of certification of plethora of future forked products just to call them Java. Unless you are planning to make a couple of bucks by charging vendors for being certified. Java source code is available already, and it “s free. Even now there are several implementations of JRE (Sun, IBM, BEA and more). Isn “t it enough?

J. OK, OK. Please answer my question now: how about adding new features to the language?

Y. To put it simple, leave the Java language alone. Create and market a brand new language that can be used with or without Java. Do not forget that Java is already more than ten years old. Sun “s engineers did a great job by mid-nineties standards. Sun Microsystems did a superb job in marketing Java. JVM rocks, Java memory model shines, multi-threading is great. But, do not forget that Java was originally created a s a simpler alternative to C++. But all these new features made this languages at least as complex as C++.

J. But what “s wrong with closures?

Y. Nothing. Closures are an equivalent of function pointers in C++.

J. But according to Java online forums people vote for closures.

Y. The problem is that people who post in all these forums represent a really small group of Java developers. Vast majority of Java programmers just write if-statements, loops, execute database queries and display results on the screens. So do not make Java overly complex. Do not scare people away from Java. Besides, it “s hard to teach an old dog new tricks. It “s not natural. It “s like a cosmetic surgery. The face looks a bit younger, but the body is still old.

J. It “s easy to critique. What do you suggest?

Y. Sun needs to create a new language. And most importantly, Sun needs to start heavy marketing campaign as soon as this new language is created leveraging existing Java echo-system. You may not even need to build this new language from scratch. Just take a stripped out version of Java and start adding new feature to it the right way. CLDC (not CDC) that is used for Java 2 ME, can be a good starting point. I was reading a white paper on CLDC, and if you forget for a minute that it was written about a language requirement to be used with mobile devices, this is exactly what “s needed by any programming language:

“provide cutting edge performance, deliver fats application start-up time, require minimum footprint hellip; rdquo; Aren “t all these features required in a non-mobile environment? Put CLDC on a real computer with lots of memory and it “ll fly there. Add full-fledged multi-threading support there. Restrict the size of the runtime to 1MB. Do not port Swing there. Come up with a new simple way of declarative creation of GUI (take a look a MXML and XAML). Add to this new language closures, continuations, mixins, and whatever else your talented engineers can come up with. Seriously invest into multimedia features of this new language.

Set up a lab where this new language will be tested on the same computers that were used back in 1995 with Java 1.0. No T1 or cable modems are allowed there: 56-bod modems. Yes dial up. Try to imagine that memory is expensive again, and some people still have only 512Kb of free RAM. Make this language perform well on slow machines.

J. Let me think about it. But what would you recommend to improve the Java quality now?

Y. Your question contains the answer. Just fix the bugs. Open the bug parade, and ask your engineers to fix all of them regardless of how many people voted for these bugs. Some of these bugs are almost as old as Java. Decrease the size of the JRE. What is it now, 16-18Mb?

J. OK, Yakov. Thank you for your input. I “m glad I called you.

Y. My pleasure, Jonathan!

Even though this conversation have never happened, I decided to write it down. Who knows, may be one day I “ll be giving advices to Jonathan Schwartz (and he’d listen to them). It “s A-M-E-R-I-C-A.

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