Interview with James Gosling
mypointofview wrote to us with an interesting interview with James Gosling [?] . It's an interesting interview format, similar to Slashdot's style. Good questions about Java, but also the problems of getting Java and Linux to *ahem* play nicely with each other.
Deja vu all over again -- the same interview was on javalobby earlier today and I just had to bite on the "incompatible Linux distribution" bait.
I assume that the "incompatibilities" he describes were differences in kernels (2.0.x vs. 2.2.x) and libraries (libc/glibc). If that's the case, I would simply suggest writing for the most recent stable version. It is possible to upgrade kernel and libraries, as we all know. Admittedly, upgrading is a drag -- especially on known-to-be-rock-solid systems. Version control is a problem on every platform, though. Let me tell you about Windows and oleaut32.dll one of these days....
While "Java vs. Linux" does not rank quite as high as "BSD vs. Linux" or "KDE vs. GNOME" on the flamewar meter, it is getting just as tired. More importantly, it is counterproductive to both sides. There is no reason to pick one or the other, either -- Linux works well as a development platform for Java. The only drawbacks right now are somewhat sluggish performance with some JVMs (I saw where IBM's alphaworks JVM actually scored pretty well on the Volano benchmark), and the annoying tendency to be 6-12 months behind the latest version (which may not be a problem if you like waiting for the bugs to shake out first).
I'm going to walk into the flamepit now:
The Java vs. C arguments are also silly. I like C, I use C, C is my friend. If I need to do system programming (OS-level, device drivers, etc.) or anything where speed is absolutely, positively the overriding concern, give me C.
But there is also application development. Here, I want short development time, easy maintenance, and a whole lot of functionality already built in. In this case, Java starts looking really good.
Insert tired "right tool for the right job" cliche here.
The "Java will soon take over" hype from 4 years ago has turned into a huge burden for the language. There are just some languages that do what they do so well that there is no need to replace them with anything (Perl, for instance). Java does have the potential, though, to move into areas where there are still some gaps. I think that Java has tremendous potential in distributed applications, for example. This is also an area where I would like to see BSD and Linux start playing larger roles. The combination will work if the two sides can quit flaming each other long enough to get it done.
Thanks for letting me get that off my chest. Back to work for me, now.
Save the whales. Feed the hungry. Free the mallocs.
Higher-order functions treat code as data. Functional languages such as Lisp allow constructs like
a simple way to ask for just the positive numbers from a sequence. In detail, it takes a function which returns true if and only if its argument is positive, passes it to a higher-order function which produces a new function that does the opposite, and passes that as a test function to another higher-order function which returns a sequence of just the elements for which the test fails. Putting control structures like iterating into a HOF that takes another function telling it how to behave is very simple and powerful and quickly becomes second nature, and the alternative, now seems ridiculous to me in any language.(Caveat lector - this code is off the top of my head, and I can't test it at the moment. Yeah, I remember #'remove-if-not, but ANSI deprecated it and given #'complement you don't need it.)
I think it's pretty clear which lines of the interview people are going to have a problem with...
Reading through the interview, it seemed like the usual chat-session fare -- a series of idiotic (You wrote assembler? So, did you ever write a virus?) questions, whose answers should have been obvious before the person even asked the question. And then we get to the Linux question... and Gosling's role as the "Mr Java Poster Child" marketing-boy starts to show through.
Why are the JDK's on Linux so far behind what you can get on Windows or Solaris? Because of 'minor incompatibilities'? Hardly. There are plenty of other cross-platform languages out there that support even more platforms than Java and work quite well on Linux (oh, like Tcl, Perl or Python). As far as I can tell, the problem is just that Sun hasn't done squat to help the Java/Linux efforts.
I mean, up until relatively recently Sun didn't even make their code available to porting efforts -- unless you wanted to shell out for a very pricey license, you had to start from scratch. Which doesn't exactly make it easy to catch up to the ever-moving target that is Java. That changed, finally, so that the Blackdown team is able to work from the Sun source now -- but as near as I can tell, that's the limit of their assistance, and it really seems to be a matter of too little, too late.
Hell, has Sun even contributed any Linux-specific code to Blackdown? If not, I don't even know what Gosling had to base his statement on.
JRaven
Bruce Perens
Bruce Perens.
It doesn't seem to have kept X from running, or Netscape, or anything else. Does he want Linus to rule with an iron fist? Sure, Linux would be real successful if we did that. Thanks
Bruce
Bruce Perens.
> 1. Java execution speeds are now approaching
> and in some cases exceeding those of compiled C
> and C++.
It is a sad statement. Any properly implemented language will exceed C and C++ for programming idioms that are natural for that language, but not for C and C++. Evn AWK does so.
> If you don't believe it's possible, you don't
> understand optimization.
The really sad thing is that some people insist that JIT compiled code in general will be able to compete with code compiled with an optimizer that can use as long time as it wants.
Of course, Java compiled to native code by batch compilers should do well.
> 4. Java has more in common with Smalltalk than
> with C or C++. That's why serious object
> developers use Java and not C++.
And C++ has more in common with Simula-67 than with Smalltalk, that is why serious object developers use C++ and not Smalltalk.
There is no "best choice" unless you are so narrow-minded that you believe one object paradigm (or programming paradigm) is superior independtly of the problem.
Good call! I knew that sermon sounded a little too eager. I didn't notice that the question was one of licensing rather than one of Java on Linux. Sounds like Gosling has a bone to pick with Linux that sounds a bit jealous and bitter. Think it's because sales of Linux are biting into the revenue stream of his corporation?
Our needs included:
portability - the application must be able to run on Windows, Mac, and Linux (if we get other *nixes as a bonus then that's even better)
consistency - the interface must be as consistent as possible across platforms
gui flexibility - the interface must be as customizable as possible
html/XML support - the language or its libraries/runtime must support HTML content, and at least be pledging future support for XML.
After doing our research, and delving into Sun's commitment to Linux, as well as its seeming support for Open Source we decided that Java was likely our best choice. The Swing components seemed to provide the desired customizability and consistency, Java supported HTML and was on its way to XML support, and the Linux support promised would guarantee us a presence on what we deemed the important platforms.
So now it's a year later. The product is designed, mostly written, and really beginning to take shape. We are trying to put together our package to show to potential underwriters but have been plagued by a serious Java issue:
The Windows and Solaris JDK/JRE packages, while still a bit slow and memory-intensive, provide most of the features we need to produce a stable and slick application which can usefully present our content. What bugs there are appear to be hot items ready for fixing in the next release. However, the Linux JDK/JRE packages are not stable, not well-supported, and not even at the same release level as the Windows and Solaris versions.
Month after month we have watched the progress of JDK development (as supposedly supported by Sun) for Linux crawl forward. We have been programming steadily, working around bugs, redesigning interface features to not rely upon features which are not yet present in Linux. Generally acting as if Java2 for Linux is not coming any time soon.
As we watch we have gotten the feeling that, despite press releases to the contrary, Sun could care less whether the Linux JDK ever gets finished, and doesn't appear to be devoting its resources at all towards the platform. Indeed, it seems as if they would prefer people forgot about Linux and its Java port altogether. Here's an example. java.sun.com is Sun's main website devoted to the Java language. Trying to actually find the Linux port from this page takes the patience of Job. Want some help? I'll locate you a few pages down in the right direction. See if you can find it from here. It doesn't help matters that Sun "reorganizes" their Java site periodically, essentially scrambling the links on the page -- reminiscent of the supermarket technique of seemingly random placement of necessities to make one wander through the store, hopefully buying non-necessities (or, similarly, the legendary placement of keys on the QWERTY keyboard to slow down the typist).
"Bad site design" aside, after looking in more desperation for help we noticed other symptoms of "Sun support gone wrong.":
Cryptic messages on Sun's message board about the availabili ty of Linux Java tools
Rumblings on the Blackdown Java port mailing list about lack of progress, with occasional hints that Blackdown is fixing bugs in Sun's code which are getting folded in for later release. While that's great (they should report bugs and the bugs should be fixed in later releases), this forces us to ask the question, "What form is the press-released 'Sun support' taking?" Evidently it's not in the form of programming resources or even $ to support developers.
Additionally, Blackdown appears to be in the lead as far as releases of the JDK go, with IBM purportedly not close to a Java2 JDK, and the other viable options being "for profit" and likely Closed Source. So, this is the net effect of Sun's much publicised "support for Java on Linux"?
This interview, to me, gives me additional reason to doubt Sun's corporate motives. While there are (even discussed on the Linux/Java developers lists) difficulties in porting Solaris thread code to Linux, and difficulties testing graphical components under the numerous X environments available to the Linux end user, if Sun were truly "supporting" the port of Java to Linux this would not really be an issue. Sun could at least provide a more portable reference implementation if nothing else. Gosling is as aware of this as anyone, but uses this as his "out" ("Sun FUD" if you will).
Similarly he straddles the fence by parroting the Sun party line -- why not truly Open Source Java (e.g., GPL it or release it under one of the BSD licenses?)? Well, it really is Open Source, but we have our own proprietary license because we want to maintain platform independence. But, ironically, the fact that Java is not truly Open Source is one of the reasons (determined from hours of sifting through user and developer mailing lists) why it isn't being ported more quickly to Linux. So, the Sun license is guaranteeing (at least for the moment) that Java is NOT platform independent.
Take this together with some reconsideration of the recent StarOffice purchase, and one begins to wonder whether Linux support is, in Sun's eyes, great PR but bad business.
"Cause there's 40 different shades of black, so many fortresses and ways to attack, so why you complainin'?"
I've been writing code for a living for 10 years or so. For a while now, I've been reading the various Slashdot discussions about Java. The signal-to-noise ratio is really low.
1. Java execution speeds are now approaching and in some cases exceeding those of compiled C and C++. If you don't believe it's possible, you don't understand optimization.
2. Our developers compile on NT or Linux, pick up the binaries and run them on our Solaris servers. Or the OS/390 mainframe upstairs. They love it and it saves them time and effort (and that means money too).
3. The IBM JDK for Linux works fine. There are some minor issues. Who cares? Stop worrying about it! Get on with the coding.
4. Java has more in common with Smalltalk than with C or C++. That's why serious object developers use Java and not C++.
If you want to write professional object software now, on PCs or mainframes, Java is your best choice. Smalltalk second. Then maybe Eiffel or Python if you're not bothered about performance, JPython if you are. C and C++ are not in the picture. Don't even think about Perl.
Now don't get me wrong - I love Open Source, and Linux is one of the best things to happen in personal computing for years and years. I would love to see a genuinely free JDK, and I wish I had the time to do it.
Free or not, Java gives you the chance to write clean, elegant and most importantly *simple* code for object systems that work.
Anyway that's my advocacy spout over with. One more thing though: some Linux people here spread FUD about Java the way MS spreads FUD about Linux. It's sad to see. We should be above that by now.
Apologies for ranting,
__ Em
Their license is NOT open source except for this issue (interoperability). It is FAR from it. See below.
First of all, there is an EASY way for Sun to make Java open source and maintain compatibility, because they own the *name*. They can license the code, but only grant licenses to use the *name* java if you are compatible.
Secondly, there are such things as Test Suites. If Sun were even remotely serious about being "open", they would make their test suites freely available. If they did this, too, the compatibility thing would be a non-issue, because every news magazine and hacker would run the compatibility tests on every new JVM released - there would be no way to be incompatible without it being public knowledge *very* fast. As it is now, we pretty much have to take Sun's word for it that a JVM is incompatible (except for Microsoft, who boast about it).
There are at least two other issues apart from the compatibility testing issue where the license falls far short of open source. First is the fact that you are licensed to use the code only for research purposes; you can't even use it internally to your business without that being considered commercial use. Or give a copy to your neighbour. You *certainly* can't include it in your Linux (or xBSD) distribution.
Secondly, there is the matter of what you have to do to escape those restrictions. It's *not* just a question of "keep your version compatible, and pass a test to prove it". You have to get a whole fresh license from Sun, which you have to *pay royalties for*. It's not even just a nominal fee to cover the cost of testing (which is ridiculous anyway - see my earlier point about free test suites) but fully fledged license fees of the same sort as they were charging people for licenses before the SCSL came out.
If Sun were serious about being open, there is a LOT they could do. Don't be fooled by their blurb.
Stuart.
Every time a faster processor comes out, developers think of a way to saturate it in C long before the clock speed ever helps Java. What do you want to spend those clock cycles on: redrawing the GUI or signal processing?
You have got to be kidding. Sun doesn't make money on Java. It's a huge money pit. I know, I'm there, that's why this is anonymous.
They hope, someday, to make money by selling more hardware because folks had Java available to them. They honestly want to provide an alternative to the Wintel platform, because they don't want Wintel to eat their lunch.
The Java vision is very pure. Mildly incompetent, but pure.
Better work on your spelling, too.
The fans will be there--the Java fans are already there, but their team hasn't shown up to the game yet. If the team bus arrives, they'll have all the enthusiasm they could ask for. Right now, the bus driver is lost somewhere out of town, and he doesn't know where he's supposed to be going.
--
Don't know about "connection classes", but "higher-order functions" are functions that take other functions as arguments or return functions as a result.
An example of a higher-order function is "compose", a function with two functions (a and b) as arguments, that returns a function(c). The function (c) it returns takes a single argument (for argument's sake), and to it first applies b and then a. So if:
a (x) = x * 3;
b (x) = x + 4;
c (x) = (compose (a, b)) (x);
then:
c (3) ==> (3 + 4) * 3 ==> 21
I would not go so far as to call the man a liar, but let's take a quick look at his responce to once question:
"Zombiehead: James, what's your stance on Java in relation to open source?
It's one of the reasons Linux is successful. Do you see this as a future possibility?
JG: We'd like to deal with the problem of Java not working on Linux. It's a somewhat complex problem.
The inter-operability problems with Linux are just horrible. You have to be excruciatingly careful because all the different flavours of Linux are all slightly different."
The questioner points out the success of linux as proof of the power of Open Source, and asks for the authors stance of the question of Open Sourcing Java.
His answer has *nothing* to do with answering this quesiton, he merely dodges the question by saying that Java has problems with Linux because the differences between distributions. The question was in regards to Java's License, *not* Java on Linux!
All I know is right now I have C, C++, Pascal, Basic, LISP, Perl, and a few other program language compiliers/interpreters that don't seem to have any problems with "interoperability" between distrutions on my Debian, SuSE, and Redhat machines.
Some smells fishy to me.
Your Brain + EEG + LEGO Robots = Brainstorms
Sun has a vested interest in pummeling Microsoft. It stands to benefit from a variety of other movements in the industry as well.
It does not want to bolster the viability of another *nix!
Why should they support a free OS, and alternative to Solaris, with a free JDK?
Sun, like everyone else, is in business to make money, first and foremost. Turning out a great product is secondary, and the good of all mankind comes in a distant third.
-- What you do today will cost you a day of your life.
The problem for Java, is that cross-platform capability has a way of limiting what it can do. Unfortunately, IMO, Sun misread the demands of the industry. Sure, there are many shops out there which use both Unix and Win32 systems. But given a type of computer (workstation, server, whatever) - you'll find that they are often all using the same platform within an organization.
But, people say, Java also fills a need for rapid, safe application development. No mucking about with pointers and such. Less mistakes = more productivity. Certainly, that is true, and people are relatively expensive compared to hardware. So the runtime speed / development speed tradeoff is often a good one.
However, Microsoft recognizes this very well. They will certainly market something to fill the gap (aka Cool). They aren't really interested in cross-platform support, so odds are, whatever they implement is going to blow Java out of the water, in both speed and capability, on a Win32 platform.
Whether customers will jump onboard or not remains to be seen.
SEAL