Welcome!

Java Authors: Liz McMillan, Roger Strukhoff, Yeshim Deniz, Dana Gardner, Elizabeth White

Related Topics: Java

Java: Article

Father of Java Seeks to Extinguish "Scripting Flamewar"

James Gosling's "Scripting Language" Remarks on SYS-CON.TV Now Clarified

'Yes, I did say those things,' wrote James Gosling (pictured talking to SYS-CON.TV), as he blogged a detailed follow-up to the 'flamewar' that broke out after JDJ reported his answer to a question asked at a New York conference by our Enterprise Editor, Yakov Fain. According to Gosling, the problem arose only because 'there's a lot of context missing' from our account of his reply, which he called "the flippant soundbite version of what should have been a long and careful explanation that could easily mushroom into a series of PhD theses."

Gosling distances himself from the "flamage" in two ways. First, he emphasizes that he knows whereof he speaks when it comes to scripting:

"Over the years I've built quite a lot of scripting systems. I've also built a number of compilers for non-scripting languages. Given enough beer I'll even admit to having implemented a Cobol compiler for money in the deep dark past. But I've done more scripting systems than non-scripting systems."

Next, he takes issue with those who would narrow down the debate about what language is appropriate to what task to just two types.

"[T]here are all kinds of generalizations about 'scripting languages' versus 'compiled languages.' My big problem with a lot of it is simply that these two polarizing categories are a pretty poor way of capturing the distinctions between language designs. The terms are almost as goofy as 'Republican' versus 'Democrat.' Taking huge multi-dimensional spaces of choices on different issues, then combining and simplifying them all down to a brutally simple binary choice is goofy."

Leaving aside that the brief JDJ account in fact stressed how any discussion about Java "versus" PHP or Ruby or any other language is moot, according to Gosling, whom we prominently reported as saying...

"We also tried to work with all these languages, so that Java works with PHP and works with Python, so you can do the web presentation layer in PHP and the analytics in Java. Lots of people do that."

...leaving that aside, the main development since we published the report is that, even though Gosling himself said categorically that in the JDJ report "The quote is accurate," a fuller transcript has become available.

Basically what happened is that JDJ's Yakov Fain asked Gosling: "There are many different languages in the world. Some people are saying there are some other new languages coming up and Java is endangered. Do you feel this way?"

Gosling replied (in full):

"No I don't, really. Most languages that have been coming up lately have been scripting languages - things like PHP and Ruby. And these are all perfectly fine systems.

A lot of the power that they get is through specialization. So it seems to me that all the languages people are talking about as being exciting today are all ones that just generate web pages. So if all you want to do is generate web pages, they work pretty well. But none of them attempt any real serious breadth in the application domain, and they all have really serious scaling and performance problems.

In all of these dynamic languages, if you try to write something in them that has serious performance requirements, they all fall over horribly. If you write a statement a = b + c, Java versus PHP its close to a factor of 100 in performance difference. What's really nice about them is that because they're focused in that one domain, they can make a lot of programming in that one domain a lot simpler.

What we've been trying to do is get a lot of that simplicity out of the tool. Because we have this horrible balancing act. On the one hand we really need simplicity, and on the other hand we really need power. And those are evil twin brothers of each other. Building systems that have a lot of power just sort of attracts complexity. And because of the way that the world has become so interconnected, it helps hugely to have systems where you do have a framework that carries over.

So with PHP you can write stuff that does web presentation stuff pretty well. You could never write a library that does interplanetary navigation in PHP. It just doesn't work.

The other one that's out there is C# from Microsoft. At some level it is hard to criticize C# because they just copied the Java spec. There was a time when we were afraid they were going to do something really creative, and they didn't. ... And they're obviously focused on one platform.

We also try to work with all of these. We know there's lots of folks who talk about Java versus X or Java versus Y. And we work hard to make sure Java works with PHP and works with Python. So you can do the web presentation layer in PHP. Lots of people do the web presentation layer in PHP and analytics in Java, because Java's really good for doing high performance analytics."

In other words, the version that Yakov Fain published in his own popular blog wasn't far off.

The Father of Java was upset enough about being taken for task for seeming to underestimate scripting languages and overestimating Java to spend some considerable time blogging his way out of the controversy. He started by clarifying what he sees as being the distinction between the two categories:

"I'll make the generalization that 'scripting language' means one that is interpreted with dynamic runtime typing, and the other camp is languages that are compiled to machine code and have static runtime typing. This is a broad over-simplifying generalization, but it matches pretty well what goes on in common conversations."

His masterclass - one of the longest entries in his java.net blog since he began - continues:

"One of the usual arguments for scripting languages having acceptable performance is that the overhead of interpretation and dynamic typing doesn't matter. The performance of the system is dominated by other factors: typically IO and the language primitives. For example, PERL apps usually spend the majority of their time in file IO and string primitives. I've strongly made this argument in the past, and it's quite valid. But having observed developers usage patterns, the two most common things that happen to erode the argument are:

Developers start doing things that are outside of what the language primitives are good at. For example, PostScript has great primitives for rendering. So long as you're doing rendering, it flies like the wind. But then someone goes and writes a game that's heavily based on rendering, and a piece of it needs to do collision detection between missiles and targets. Physics in PostScript: a bad idea. Developers start clamoring for new primitives. Some are too specialized to be reasonable 'I want a fast collision engine,' some are rational 'object oriented programming has become the dominant style in PostScript, but the OO model is implemented in PostScript as a library and is slow.'"

What most developers seem concerned about, at this point, is not whether Gosling is right or wrong, quoted fairly or misquoted, so much as: what's best for them to learn and to use right now if they wish to eke a living our of software development.

Let us then risk further ire by giving the last word to the developer Roy Batty who wrote, in a feedback thread to one of the many discussions that the original JDJ report sparked off:

"The irony about the 'serving up web pages' statement is that Java never really made it out onto the desktop at large and the vast majority of the presentation of Java apps is done through a browser...Gosling needs to get back to the lab and think about what's beyond Java."

More Stories By Jeremy Geelan

Jeremy Geelan is Chairman & CEO of the 21st Century Internet Group, Inc. and an Executive Academy Member of the International Academy of Digital Arts & Sciences. Formerly he was President & COO at Cloud Expo, Inc. and Conference Chair of the worldwide Cloud Expo series. He appears regularly at conferences and trade shows, speaking to technology audiences across six continents. You can follow him on twitter: @jg21.

Comments (11) View Comments

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


Most Recent Comments
Steev Coco 04/21/06 12:42:54 AM EDT

The comments about the annoying ads on this site are right on!

This is among the worst obscenities ever placed before human people...

Davey Jones 04/18/06 10:38:38 AM EDT

I find it ironic that this site is writing about development and web design and is so completely ugly and filled with moving advertisements that it gives me a headache to read. Stop the madness!! The ads are an irritation.

m 04/03/06 03:43:53 PM EDT

I agree that the Richard Batty (whoever the heck that is) quote is useless other than being purposely inflammatory. Ignoring whether or not Java has been / is /will be viable on the desktop for rich/thick applications, the point of Gosling's comparative allusion in his comment about 'ones that just generate web pages' is validated simply by noting that Java is used to implement back end systems. A least a significant percentage (if not a majority) of Java code used in 'web applications' does not have anything to do with rendering the actual html page, but is instead performing business logic of some sort.

Werner Keil 04/03/06 09:25:08 AM EDT

Well, that very last quote is quite true or at least has been for a long time.
Trends like Rich Client Applications (based on Swing or SWT) bring Java to the desktop again. And there seems no serious competition other than partly from C# and VB.NET on Windows.

Ironic enough that Rich Client trend really went hotter than before after Eclipse launched their RCP not based on Swing or what Sun and Gosling have given to Java only...

Infernoz 03/31/06 10:00:01 AM EST

Lisbeth,
some people like their compiler to pick up their mistakes at compile time rather than runtime, and take advantage of runtime non-virtual call optimisations. It can be _very_ costly if ae fault is not picked up until substantial sums of money get stuck, because the software misbehaved or broke, or runs very slow because the interpreter sucks. Been their done that, like strong typing much better, if only for the piece of mind and, yes, reduced maintenance cost over scripting language apps.

Henry Rob Pont 03/29/06 09:33:36 PM EST

"Developer" Roy Batty?

Of all the so call comments left by JDJ the one picked is the most imflamatory and useless of them. Roy Batty (AKA Dick Ford) is well known to be a troll of many different weblogs. Including one here...

http://www.artima.com/forums/threaded.jsp?forum=106&thread=150515

What exactly is he backing? Nothing from any of his statements (only to incite and be an ass) and yet he has contributed NOTHING in the face of Gosling or Rossum...

For shame JDJ for highlighting a troll!

Morten Christensen 03/29/06 05:47:45 PM EST

I watched Java getting popular 10 years ago and joined the fun early on (moving on from C++ to Java). Still like Java and also do quite some C# which is more or less the same.

Observing what is happening around Ruby (and Ruby On Rails in particular) I recognize the exact same momentum/enthusiasm and also reluctantly recognize that Java is getting stale.

I think Sun would do well to embrace Ruby on the Java JVM platform in order to keep Java (the platform) relevant 10 years from now. The weakness in Ruby is the Ruby "VM" which is the chance for the Java JVM technology. By combining Ruby the language with the great Java VM + Java libraries, Sun could produce the killer technology for the next 10 years (and easily outdistance C# and .NET).

P.S There is a partial ruby implementation called JRuby that runs on the Java VM. As such, this implementation has indirect support for native threads and unicode (which is lacking in the official Ruby "VM"). However, JRuby is not the "official" version nor currently complete enough to run "ruby on rails" or other main offerings (allthough the implementers are working hard on this). Also, JRuby is currently not very fast compared to Jython or similar scripting language implementations on top of the Java VM. Still, JRuby is very promising and worth a special notice.

Lisbeth 03/28/06 12:43:53 PM EST

The thing that Gosling - and a lot of other people in this debate - can't seem to see is that "strongly-typed languages" and "scripting languages" are not polar opposites.

Strongly-typed languages are generally characterized as being compiled into machine code (actually Java is compiled into p-code), and having data types established at compile time.

Scripting languages are characterized as being interpretted at run time with data types established as the code runs.

These two characteristics of when code is parsed and semanticly analyzed, and when data types are determined are not the same thing. It is perfectly possible to have an interpretted language with strong typing or to have a compiled language with weak typing.

In fact there are tremendous advantages to weakly-typed, compiled languages, especially where the interfaces are weakly-typed. How much recompiling is done because the data type of a property in a library has been changed? How much of the Windows DLL nightmare would be solved by it?

It's time for people to start thinking outside their current paradyms.

m 03/28/06 12:31:51 PM EST

Too many people are missing Gosling's point. Specialized languages are great and often, if not usually, the best tool to solve a problem in a given problem domain. However, the world is full of many complex problems that cross multiple problem domains and there are many advantages to having a single language that will address all those domains. I'm not saying this is always preferable, but it definitely has proven by the market to be a preferable thing in a significant share.

Before you compare language / tool usage, you first need to scope whether your problem is restricted to a given problem domain or crosses multiple domains. You then need to evaluate whether you need a cross-domain tool or whether your particular scenario is better solved by using specialized tools at each point. If the former, then it is reasonable to compare Java to other tools that also cross those same domains and in this case few tools compare with well with Java. If the latter, then Java may still do well in a given specialized domain, but it may just as easily be eclipsed by a more specialized alternatives.

For example, if I want to only build a fast scientific computation, I still may be best served to use good ol' Fortran or C or, who knows, even assembler. Or I might use a scripting language like IDL that is loaded with powerful primitives designed specifically for scientific computations. I might get away with using Java but I doubt seriously I should begin to try to address that with a interpreted scripting language like Ruby that does not have the correct set of primitives for this problem domain. On the other hand, if I am building a web app, Ruby or PHP may be by far my best options, while Java is not unreasonable and Fortran drops right off the table of consideration. Now, suppose I have to build a web app that is backed up by my super fast scientific computation? That is where it gets interesting. Am I best served by creating the web app in Ruby and the back end in Fortran? Or is it better to do it all in Java? There are a wide variety of factors one has to consider here from talent resources to cost of integration to pure performance. There is no single answer. The market for the most part has leaned toward the "use Java in some form for all stages" answer so far, because Java is a reasonable solution in most all problem domains. However, there are clearly many cases where it is not sufficient or we need 'better than just reasonable' and that is why there is a ton of room for other tools and languages that are stronger in various specific domains.

Finally, it is the nature of programming languages to evolve and grow in scope. Who knows? In the future, maybe Ruby will encompase a broader scope of problem domains than Java. If that happens, I guarantee that this same conversation will be happening where someone is advocating the advantages of specialized tool over the 'beast' that Ruby will have become.

End note - a minor correction on someone else's comment that Java is also just an interpreted language. Java is not interpreted in the same way as many of the scripting languages we are talking about. Java is compiled to an optimized bytecode which is then in turn interpreted by the JVM (although in most cases large amounts of the bytecode are in turn compiled to native opcodes by either a JIT or Hotspot). This is not the same as a language that is line-interpreted from source. Drastically different.

KevDev 03/28/06 11:20:17 AM EST

I agree with James Gosling that he was shorted in the article. When I read the orginal article, I was disappointed with its lack of content. This time I went back with a ruler. The article amounted to only 8.4% of the entire page - 92% of the page was flashing, scrolling, blinking crap. That's a lot to wade through for a disappointing few sentences.

Of what was contained in the orginal article JDJ managed to get at least 17% of it not quite right. The first article quoted Gosling as saying C# was 'hopelessly focused' on one platform when Gosling actually said 'obviously focused'. This might seem trivial, but the misquoted version has potential implications not present in the real version.

Now in this article JDJ focuses on defending themselves.

Engineers want information - not this he-said/she-said soap-opera garbage; we have the National Enquirer for that.

Bassam 03/28/06 10:50:11 AM EST

I feel that James Gosling is trying really hard to avoid talking about Ruby and instead attacking PHP, PERL, and C#. He should look more into Ruby.