James Gosling, the creator of Java as well as a Sun Microsystems Inc. fellow and chief technology officer of Suns Developer Products group, sat down with eWEEK Senior Editor Darryl K. Taft at JavaOne last month to discuss the ongoing adventure of Java—where its been and where its going.
At some point a while back you indicated that there might be a follow-on to Java from a language perspective. Is that still the case?
Weve got a variety of projects working on a variety of things. Im not exactly sure which comment youre referring to. If language evolution ever stopped wed be in deep, deep trouble.
Weve been doing a bunch of work to make the Java VM [Virtual Machine] a lot friendlier to some of the stranger dynamic languages. A lot of that will show up in the next version.
Weve done a lot of work with different languages as targets. We have one rather strange language project going on in Sun Labs. Its really centered around the combination of numerical computing and extreme multithreading.
That ones been going on awhile, though, hasnt it?
Well, yeah. That ones a really hard science project. Its got a ways to go before it produces anything real.
There are a lot of other hard problems in building something that really scales to hundreds of thousands of threads, and really does the kind of concurrency that people need in numeric computing. Its been an area of research for literally decades.
Javas pretty far along on the scale in terms of its effectiveness at doing multithreading. And for the kinds of applications that most people write, it works extremely well.
But when you get to numerical applications where there are a lot of cross-thread data dependencies, life gets very difficult. And its generally an unsolved problem.
Is anybody close to solving it, other than what you guys are doing?
I dont know about close. There are a lot of people trying a lot of different things. Were sort of going down this road because its very clear that serious multithreading with a large number of chords is the future. And the stuff that we do now works really well for the enterprise-class apps. And we know this will scale to a few thousand processors.
You cant buy machines that big yet, but you will be able to at some point. But that depends on the interesting properties of enterprise apps that are different from scientific apps. So its a really interesting research topic.
At [last month], Sun executives indicated some tentative things that might go into Dolphin [code name for Java 7]. Which of those do you think must go in?
Boy, I dont know that I have anything that “must” go in.
Well, what would you like in?
Oh, there are all kinds of things Id like in. Small object support—thats been on my list for a long time. Not that it even matters to most of the community, but it tends to matter to me.
What about things like direct XML support, something about cross-package references and method references?
Well, things like the cross-package reference thing is one of these ones where … I mean we do have ways to do cross-package references in different languages at different things. They all have their problems. And that ones looking for a brilliant idea. And I havent seen anybody in the computer science research community thats had a really good, brilliant idea.
There are a lot of hacks, and a lot of people have a lot of ideas, but they just tend to create more problems than they solve.
Method pointers? That ones been a long discussion for years. Id actually be surprised if we ended up doing anything like that, if only because using classes properly does method pointers pretty well. And the things that people do with proxy objects now deals with method pointer situations pretty well.
I guess I wouldnt put those on my list. My list would contain things more along the lines of yet more interesting stuff in Swing. Theres a lot of stuff we could do in rendering still, even though our 2D rendering has gotten pretty good.
Direct language support for XML has been a debate for some time. All these things at an abstract level kind of sound like the thing to do.
When it comes down to the details, one of the problems ends up being that using Java today you actually get pretty good access to XML.
And really what it would end up being is sort of syntactic sugar that makes certain constructions simpler, but can you come up with something that actually makes peoples life better by enough that its worth adding that baggage?
Its one of these things that these days is a community debate.
Dynamics of the Tool
Why do you think Suns development tools never commanded a greater share of the market?
Well, were on our track to getting there. You look at the adoption curves and were doing pretty well.
But the dynamics of the tool market are that ever since Microsoft introduced Visual Studio and dropped the price to essentially zero, its pretty much impossible for any company to sell tools for any price that comes close to covering their costs.
And that sort of turned the tools world into one where the only people who could produce tools were people who had sort of an indirect business model.
Microsofts business model around tools is all about developer lock-in to their platform.
So everybody in the Java tools world was on the one hand building really nice tools and people were liking them, but they had to cut their prices to … Well, it didnt matter how popular you were, when youre selling things for negative margin and making it up on volume it doesnt work. And we had had a few tools efforts that we sort of shut down.
We decided we really needed to support the tool world so we bought this really little company in Prague called NetBeans, and we sort of left them alone for a while and they were kind of struggling.
And then starting a couple of years ago we decided we had to really push on them and help them out. They were a bunch of fairly academically oriented folks who were doing really interesting things from an academic point of view, but getting the engineering right was something they needed help with. So we spent a lot of time working with them.
Was that in response to Eclipse?
Well, sort of yes and no. NetBeans was open-sourced about a year before Eclipse was announced, and we had been putting a fair amount of energy into NetBeans anyway.
But then when Eclipse happened … It was another interesting sort of IBM product, so we figured we couldnt fool around anymore and we needed to really put the pedal to the metal and make the thing scream.
And right now, the current FCS [First Customer Shipment] release of NetBeans 4.1 is actually really excellent.
Well, I know this has been bandied about, but do you think therell ever be any cooperation between Eclipse and NetBeans at some level?
Eh, at some level maybe. Its really hard to tell. The architectures at the core of both of them are different enough that its really, really hard to line things up. Were certainly achieving a fair amount of interoperability.
Weve got pretty good import filters; we both handle similar kinds of data objects like Ant scripts and such. Weve put a huge amount more effort into the specialized development areas like J2EE [Java 2 Enterprise Edition] and J2ME [Java 2 Micro Edition, now known simply as Java ME], and a lot of interesting stuff in the cell phone world.
Its hard to know.
Have you played with Eclipse at all?
Oh, Ive played with Eclipse a few times.
Its sure gotten slow. And the whole SWT thing is just too silly for words.
Losing Years to Lawsuits
Yesterday you and [Sun Distinguished Engineer] Tim Lindholm both said the Microsoft legal suits had taken a lot out of your workaday lives. How much of an impact did it have, and how much do you think you could have accomplished if it had not occurred?
Its hard to speculate. I lost at least two years out of my life. And as incredibly massive bits of tedium that just suck the life out of you, court cases are unexcelled.
We were able to keep the set of people that had the life sucked out of them to a reasonably small list, but for the set of us that were in there it was pretty serious.
Will we see a fully conformant open-source implementation of Java SE from Sun?
Well, there are lots of different answers. One is, “Beats the hell out of me.” You never know what the future will bring. One would be, “You know were there yet, were there already.” If you look at the way that we interact with the community, the way that we have all of our sources out there, we have a lot of people from the community that contribute the way any open-source projects do.
Really the major thing thats an obstacle to truly being open source is the nits in our license about testing. And having our license require testing disqualifies us from the religious blessing of the open-source community.
And yet the licenses that say you “must” make your stuff free, thats OK. Having anal clauses like you must make your stuff free, thats OK, but when I say, “You must test,” thats not OK. I dont know why theres that religious divide. Its deeply mysterious.
And when we talk to Java developers and big sites that use Java, interoperability and reliability of these systems are really, really important to them.
Right. But do you think that theres a possibility someone else could do it?
Oh, theres certainly a possibility.
Well, what kind of disadvantage would that put Sun in?
I dont think it would make a whole lot of difference. When you look at the J2ME world, there are dozens and dozens of compatible, interoperable JVMs [Java Virtual Machines] out there. But of course they all do the testing. We have a test suite, and they all run that.
And like the Harmony folks at Apache, they say theyre going to run through the tests. If they do that, thats OK.
I noticed theres some Ajax component for Java Studio Creator 2. What are your thoughts on Ajax?
So the nice thing about Ajax is it encapsulates the nightmare and it makes that easy to use.
Whats your take on Suns Coyote project [to foster the use of dynamic languages with Java]?
I think thats actually pretty cool. Most of these people have been pretty successful doing these dynamic languages on top of the JVM. I think its pretty amazing that it has worked as well as it has. As to exactly where that thing is going to go … Im in general a big fan of dynamic languages.
Java is sort of an unusual design. On the one hand Im a real fan of dynamic languages; on the other hand Im a real fan of performance. So the static languages tend to get better performance than the dynamic languages. And so I wanted to come up with a system that would have as much dynamic language behavior as possible while being able to have C and C++ level performance. And thats actually worked out pretty well.