Interview: Sun’s Gosling defends Java open source stance

Technologist also questions Microsoft’s interoperability commitment

James Gosling is a 20-year veteran of Sun Microsystems and wears many hats at the company, including vice president and Sun fellow and CTO for the vendor’s Java Development Platform and Tools group. But the T-shirt-clad Gosling is perhaps best known as the father of the ubiquitous Java programming language. InfoWorld Editor at Large Paul Krill spoke with Gosling at the 2004 JavaOne Conference last week about Java, including the current open source controversy, and about other technology issues, such as his feelings about rival Microsoft.

IW: What’s your take on this open source Java controversy?

Gosling: I’m very conflicted on the topic. There’s part of me that feels like we already have open sourced it. If you go to the Web site, you can download all of the sources and you can build your own copy of J2SE and you can edit it and play with it and do all kinds of stuff. There’s a catch, though, which is that if you want to redistribute it, you have to pass the test suites, and the test suites are all about compatibility. And so many people in the open source community believe that the compatibility test requirements mean it’s not open source right there.

They’re really saying that the requirements for interoperability make [Java] closed. And I actually think that that’s a bogus requirement on their part, but if you survey the community, you find that probably the single most, or one of the most, valuable aspects of Java is the interoperability, compatibility, and reliability of the system as you go from platform to platform. Developers really, really value that and in the pure sort of open source model, all notions of compatibility and interoperability just go out the window because it’s one where anybody can do anything, right? And you can call it anything.

IW: Is there a middle-of-the-road plan for open sourcing Java, or does Sun now have the middle of the road?

Gosling: Well, we would love to find the middle of the road. We feel like we’re sort of surrounded by many conflicting interests, and trying to make all these different parties happy is just nutty.

IW: Who are the conflicting interests?

Gosling: Well, they’re all over the map. There are researchers at universities that just want to play. There are platform vendors that want to be able to do whatever they want. There are platform vendors who sort of maliciously believe that interoperability is a bad thing. There are developers who really value having a stable, reliable system. There are all these constituencies and you try to figure out how many there [are] in these populations. The size and importance of the community that values stability and compatibility and interoperability seems to be the largest. The population that is the sort of open source zealots tend to be the loudest.

IW: Is Sun making any money on Java and how?

Gosling: We make it all over the map. We get license revenues for things like smart cards in cell phones, we get direct money for things like tools. We get support money for platform stuff, we get a surprising amount of hardware leverage.

IW: What do you mean by hardware leverage?

Gosling: If you wind back the clock about 10 years and you do a survey of all the ISVs and what platform do you want develop for, a lot of them would say, "well, we want to develop for Solaris, but there’s this NT thing out there and Microsoft is the big thing on the block, and we believe we have to do NT for business reasons. And we can only afford to do one." And every ISV did the same calculations and every ISV was in the process of dropping every platform except NT. To put it mildly, they scared the bejesus out of every platform vendor, not just Sun.

The big value proposition of Java to Sun is the fact that it makes the software market healthy by decoupling the software market and the hardware market so that people can develop software that will run on systems that we build, but at the same time, not cut themselves off from selling in the Windows market.

The other interesting thing that’s been happening with Sun lately is that because the instruction set and the binary model are sort of decoupled, it means that we aren’t forced to do Sparc forever for our installed base. We can do kind of whatever is the best from a price performance point of view. So over the last couple of years you’ve seen us to do some pretty interesting machines with other architectures.

IW: Is Sun considering dropping Sparc?

Gosling: No. [Still], the general tendency on average these days is to be guided by volume market, which tends to be desktops. So the average chip is really optimized for desktops now.

IW: Does Sun still have a niche with large systems?

Gosling: Yes. And what’s a large system, what’s a small system is often hard to define. [Sun has] this next-generation chip called Niagara, which I believe is like a 32-CPU single chip.

IW: Is Sun still selling a lot of desktop workstations, or is Intel displacing a lot of those?

Gosling: Well, we’re still selling a reasonable number. I don’t know what the numbers are. I mean fundamentally for us the issue with workstations is that they’ve become so commoditized that it gets pretty challenging to do something that really distinguishes you from the rest of the pack. And yet, there are some interesting opportunities. We’ve got this Opteron workstation that we’ve just announced that I think is pretty cool. And there are other things that we’re likely to do.

IW: What happens to programming beyond Java, and at what point do you need a successor or does Java last forever?

Gosling: Well, I think it would be a pretty tragic statement of the world if Java was the last programming language for the next millennia.

IW: But where do you see it going? What do you see as the successor to Java?

Gosling: That’s pretty hard to say because the thing that really made Java work was that it was really a response to a pretty fundamental change in the way that people thought about computing, and that was this whole notion of open distributed computing where you have these large-scale networks that interact with regular folks in the street. In a programming language, I think you’d need some really big shift in the underlying paradigm that really drives it. And I don’t feel any of those [are] really imminent. There are some places where there are some issues that are getting difficult.

IW: Which would be what?

Gosling: Well, as horsepower goes up, a lot of systems are behaving in a more AI-kind of manner. There are all kinds of issues around scale. A million-line program is fundamentally different than a 10,000-line program. There are ways that you would think of building systems that are profoundly different. Right now we are principally attacking the problem with tools, and that seems to be pretty effective. And I guess I personally feel that tools are the right answer to this scale question for the most part.

IW: Is Java running up against some roadblock or barriers as far as what it can be used for?

Gosling: Well, no, Java hasn’t been running into scale barriers. It’s more that human comprehension has run into road barriers. Attempting to understand the complexities of these systems has gotten way out of control and most humans cannot really understand … an entire system.

IW: So what does that mean for Java?

Gosling: People are building these systems with Java, but there [are] things that one can do to make these things more comprehensible, more integrated, simpler to understand.

IW: What can you do? What is Sun proposing at this point?

Gosling: It’s an open question. But the guts of our proposal -- what we do right now, the directions in which we feel that these problems can be most effectively answered, is in the tools. So we do a lot in the tool world to cope with scale. It’s pretty easy in the Java world to find multi-million line programs, and tools have been so far pretty effective at dealing with them.

IW: Are you disappointed at all that Microsoft is not at JavaOne to show any kind of camaraderie with Sun as far this new arrangement between the two companies? I asked Microsoft why they weren’t here, and basically the answer was they have never been there in the past and would not participate this year either, which made it sound like business as usual to me.

Gosling: If they had wanted to come, it would have been very nice. I wasn’t disappointed because I never expected it. I can’t imagine they would change. In the early days of Java, they were actually behaving quite differently. They were actually really good citizens and then they just turned left and their interactions with the world kind of went back to normal. They fundamentally view interoperability as a bad idea. If you look at the record in the court cases, they have this very strong belief that interoperability is a one-way street. They will take anything in, and they make sure that stuff you develop on their platform cannot go out. It’s sort of the roach motel version of interoperability. Interoperability just fundamentally doesn’t work unless it’s a two-way street.

IW: You said Java has a better security model than say C++ or Microsoft . Net. Why is that the case?

Gosling: The core aspect is that there’s a very tight memory model [in Java] that makes it so that you know exactly what every object is, you can’t lie about it. When somebody gives you a piece of memory, you can’t just sort of reach outside of it. It is what it is. It is a bounded thing that they contract between you and it, and that contract is enforced. The way that C and C++ languages are defined, you’re required to be able to go outside of any contract. There’s nothing you can’t violate. And all of their architecture is deeply based on sort of C and C++.

IW: Could you give a layman’s explanation of what AOP (aspect-oriented programming) is?

Gosling: Boy, that’s sort of an impossible request.

IW: I’m hearing that it is about modular programming.

Gosling: Java is a very sort of flexible, friendly environment and it’s got this underlying abstraction, the Java Virtual Machine, that makes it very interesting and straightforward and easy to experiment with this kind of stuff. If you tried to do AOP in C++, you really have to build the entire programming methodology environment all over again, whereas in Java the folks who want to experiment with AOP, they have to do a whole lot less because they don’t have to do the whole environment.

IW: You mentioned in one of the sessions today that you’re more excited about the Java Virtual Machine than perhaps the language itself. Could you maybe expound on that a little bit?

Gosling: If you look at the set of properties that people talk about as the interesting properties of Java, [such as] security and reliability and portability, those properties really flow from the Virtual Machine specification. The language itself is really kind of a conceptual bridge from a human to the Virtual Machine specification. It’s sort of a one-size-fits-all language that you can do a lot of different tasks with, but there are some tasks where in specialized areas there are better ways to think about them.

In the world of normal human discourse, there are many languages that people often use that are rather specialized, right? So we may speak in English for most stuff. But somebody doing mathematics, if you try to express physics formulas in English, you end up with something that is just a mess and almost completely incomprehensible, right? If you use mathematical notation, you end up with something that is comprehensible.

Similarly, you can look at other kind of languages that people use every day, like body language or the language of paintings and whatever, [with] lots of different ways to express things. And having different modes of expression is, I think, in general a good thing so long as they have some way to relate to each other. That’s what the JVM gives you.

IW: What is the technology dubbed “Groovy” about?

Gosling: Groovy is a scripting language that some people out in the community put together. It’s a scripting language that is like Java, but [developers] tweaked a bunch of things to give you shortcuts, notational shortcuts. Those can be good for making your program more compact, they can also be kind of bad because they make it less comprehensible, sort of like shorthand notation. So if you’re just dashing out something quick, Groovy works great. If you’re trying to build a large system with a lot of people working on it and it has to evolve over the years, it becomes incomprehensible.

IW: Regarding Red Hat, it almost sounds like Sun is resentful that Red Hat hasn’t had to produce any technology to gain market share. Is Red Hat actually providing any technology contributions?

Gosling: It’s fairly minimal. In some sense I think we’re somewhat envious, right? I mean they sell something to which they have a fairly minimal R&D investment and yet they enjoy the benefits of it. It’s -- wow!

Copyright © 2004 IDG Communications, Inc.