The Artima Developer Community
Sponsored Link

Java Community News
Java and Other Languages: What Gosling Really Said

43 replies on 3 pages. Most recent reply: Apr 2, 2006 11:16 PM by Vineet Billorey

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 43 replies on 3 pages [ 1 2 3 | » ]
Bill Venners

Posts: 2284
Nickname: bv
Registered: Jan, 2002

Java and Other Languages: What Gosling Really Said Posted: Mar 22, 2006 3:36 PM
Reply to this message Reply
Summary
There has been a lot of discussion around the net, including at Artima, about Gosling's recent comments concerning PHP, Ruby, and other languages. But until now, the full transcript and context wasn't available.
Advertisement

Last week we posted a short news item pointing to some comments made by James Gosling, and some questions about the accuracy of the quote came up in the forum discussion. James Gosling himself indicated that, "The quote is accurate, but incomplete and missing context." In this news item I give the full transcript of his comments, which recently became available in video form.

Gosling made these comments when answering a question posed by Yakov Fain at the end of a talk at Sun's World Education and Research Conference. The video can be seen at Syscon at this URL:

http://sys-con.tv/read/196169.htm

The quality of the video and audio is rather poor. Here is a transcription:

Yakov Fain: 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?

James Gosling: 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. They chose not to [garbled] borrowing. 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.

What do you think of Gosling's opinion, now that you know what he really said?


Isaac Gouy

Posts: 527
Nickname: igouy
Registered: Jul, 2003

Re: Java and Other Languages: What Gosling Really Said Posted: Mar 22, 2006 4:02 PM
Reply to this message Reply
"...have a framework that carries over. So with PHP you can..."

Isaac Gouy

Posts: 527
Nickname: igouy
Registered: Jul, 2003

Re: Java and Other Languages: What Gosling Really Said Posted: Mar 22, 2006 4:32 PM
Reply to this message Reply
close to a factor of 100 in performance difference
The Computer Language Shootout
http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=java&lang2=php

Joao Pedrosa

Posts: 114
Nickname: dewd
Registered: Dec, 2005

Re: Java and Other Languages: What Gosling Really Said Posted: Mar 22, 2006 10:55 PM
Reply to this message Reply
I expected more or less what you have just transcribed. I think that by memory the Yakov's version was pretty close. :-)

Java isn't perfect either. And neither is C#. Maybe C#'s progress has disappointed James Gosling? How many chances we will waste until we create the next programming language that will really scale from systems programming to web page generation? I'm not sure it's an easy task, as nobody seems to get that right. And to make it become mainstream is another issue.

GTK vs Swing - It's not clear who is the winner. GTK is installed on many Linux desktops, and powers the GIMP and other popular open source programs, including Eclipse on Linux.

Java vs C# vs Ruby - It's not clear who is the winner. Java has great performance, great mindshare. C# has great IDEs, and will be integrated in the most popular OS on Earth as soon as Windows Vista is released. Ruby is really neat, despite the fewer resources that are available to it.

Desktop vs Web - The Web is the winner for many serious needs. The Desktop is still needed, though.

2d vs 3d - 2d is the winner.

Hibernate vs ... - Hibernate is the winner. Pity people can't beat it all around. :-) Hibernate deserves some real contenders.

Etc. If my programming language gives me access to GTK, Web, databases, 2d, etc, while still being neat, I can live without a lot of performance. Of course my dream isn't complete. But by the looks of it, nobody's dream is complete. :-)

Ivan Lazarte

Posts: 91
Nickname: ilazarte
Registered: Mar, 2006

Re: Java and Other Languages: What Gosling Really Said Posted: Mar 23, 2006 12:14 AM
Reply to this message Reply
I dont think Gosling had anything malicious at mind in that statement. I dont understand why so many jumped up with derisive comments about it.

It should be a compliment to call them scripting languages, but I think the wording played on some of the insecurities of the "dynamic language" communities, particularily those more web focused.

I took no offense in the name of Python, which is one of the languages I love coding in :) Likewise, I enjoy Php in the rare occasion I code in it. Maybe people should learn to just relax!

Achilleas Margaritis

Posts: 674
Nickname: achilleas
Registered: Feb, 2005

Re: Java and Other Languages: What Gosling Really Said Posted: Mar 23, 2006 2:54 AM
Reply to this message Reply
> What do you think of Gosling's opinion, now that you know
> what he really said?

Personally I think the new full version does not change the interpretation that most people gave in the first short version. Gosling said that these new languages are slower than Java, more specialized than Java, and Java is better overall.

Haven't we heard these arguments numerous times before? it was the same with C++ 10 years ago: "C++ is faster for computation, and all these new languages will call C++ to do their computation for them, because it is so much faster"...but in the end, when Java JVMs got better, no one needs to invoke C++ to do the computations for them.

The same thing will happen to Java: when Ruby matures, no one will need to invoke Java anymore.

Ivan Lazarte

Posts: 91
Nickname: ilazarte
Registered: Mar, 2006

Re: Java and Other Languages: What Gosling Really Said Posted: Mar 23, 2006 7:28 AM
Reply to this message Reply
If there was a scripting language that would've dethroned C++, it could've happened before with Perl (available in the 80s?). Java succeeded in that it was an incremental step, not a high level replacement for low level programming.

Ruby is one of the slower languages out there, the Computer Language Shootout details some of those numbers. I can't believe that Ruby will replace Java; in fact, I can't believe Ruby is taken seriously at all, given that it was pretty much dead to the world, especially the web, prior to Rails.

What's wrong with the possibility of scripting interfaces to strong lower-level languages? "It's gonna replace it! It's gonna replace it!" I hear the message over and over again, almost like someone is trying to convince themselves... A really useful language has nothing to prove, just look at the Python community, quietly kicking butt through the years.

Matthew Trumbell

Posts: 7
Nickname: taft
Registered: Mar, 2006

Re: Java and Other Languages: What Gosling Really Said Posted: Mar 23, 2006 7:44 AM
Reply to this message Reply
I think that Goslings comments are really quite moderate and don't boil down to "Java is better." And with comments like "So you can do the web presentation layer in PHP. Lots of people do the web presentation layer in PHP and analytics in Java...", it seems to me that he advocates using the best tool for the job. Now of course he is the "father" of Java so he will have a bias towards the language. But it seems to me that he is actually giving a lot of credit where credit is due.

> Haven't we heard these arguments numerous times before? it
> was the same with C++ 10 years ago: "C++ is faster for
> computation, and all these new languages will call C++ to
> do their computation for them, because it is so much
> faster"...but in the end, when Java JVMs got better, no
> one needs to invoke C++ to do the computations for them.
>
> The same thing will happen to Java: when Ruby matures, no
> one will need to invoke Java anymore.

This attitude seems to pervade the minds of die hard ruby/php supporters. I can think of no statement as blatantly simplistic and wrong as the following:

"when Java JVMs got better, no one needs to invoke C++"

No one. Not one single person? Look, my bread and butter is Java/C# coding and I much prefer coding in those languages than C++. But even I have found places where C++ is the right solution. This all or nothing attitude towards software development is really very silly and is to the detriment of the developers who espouses it.

It also seems to come primarily from developers focused on web solutions. While no one can deny the enormous volume of projects targeting the web, we must still recognize that there are many domains in which web solutions are simply inadequate. I work in finance, for instance. While I use web applications for many of the more "static" functions of the systems I design, they are simply not going to cut it in real time systems crucial to our business.

And before someone jumps down my throat as being a Java extremist...guess wha language my website is currently implemented in? PHP. And I'm in the process of porting it to Ruby because I see the value rails adds to traditional web development methods. Plus, its just fun to work in.

Whoever coined the phrase "the right tool for the right job" deserves a medal (or something...). More people should wrap their minds around that advice.

John Roth

Posts: 8
Nickname: johnroth
Registered: Jan, 2005

Re: Java and Other Languages: What Gosling Really Said Posted: Mar 23, 2006 7:46 AM
Reply to this message Reply
From the transcript, I think he was quoted quite accurately, and the criticism was right on.

What he did was pick one example of the group of "scripting languages", and make it seem that they were all like that by implication.

The group includes Perl, Python, PHP, Ruby and TCL, to name what I think are the five most popular. PHP is the only one that is "about creating web pages". One might think Ruby is, but that's because of the current popularity of Rails. Perl is about system administration, Python is quite general purpose, and I haven't any idea of what TCL is about, other than Tk and Expect.

PHP may well be 100 times as slow as well tuned Java in a server application, but that's not particularly true of the others (except maybe TCL). Java's factor of 3 to 5 (not 100!) performance advantage over Python is strictly due to JIT technology and an early choice of garbage collection model that sucks rocks performance-wise. Five years from now, neither is likely to be true. Where any of the others will be, performancewise, five years from now is anyone's guess.

In addition, none of these languages is precisely new. Perl and, I believe, Python and TCL are older than Java. I think Ruby is later, but not by that much. PHP? It's not that new either.

John Roth

Merriodoc Brandybuck

Posts: 225
Nickname: brandybuck
Registered: Mar, 2003

Re: Java and Other Languages: What Gosling Really Said Posted: Mar 23, 2006 7:50 AM
Reply to this message Reply
> What's wrong with the possibility of scripting interfaces
> to strong lower-level languages? "It's gonna replace it!
> It's gonna replace it!" I hear the message over and over
> again, almost like someone is trying to convince
> themselves... A really useful language has nothing to
> prove, just look at the Python community, quietly kicking
> butt through the years.

I have to agree. I was going to point out that C is still with us. C++ was supposed to be a better C. It is in a lot of ways, but hey, C still interfaces with everything. I don't think the same can be said of any other language.

I still can't concieve of one super-language that is good for everything. Maybe I'm short sighted.

Lisp hasn't tried to prove anything over the years, either. It's been around a lot longer, quietly kicking butt when it can where it can.

I'm still not sure why people got so fired up over Gosling's comments in the first place, even the edited ones. He didn't say anything terribly confrontational. So different languages have different strengths. Duh.

I'm not sure about his take on C#, because C# is starting to integrate some higher-order functionality into it. I saw a LINQ demo a couple of weeks ago and that looks very powerful. I don't follow Java so I don't know if it has similar capabilities in the pipeline. Here are set of examples for some of the things you can do with LINQ http://msdn.microsoft.com/vcsharp/future/linqsamples/

It's very dynamic, script language type stuff that you can do in a compiled, usually static environment. I was wondering, as I looked into this, how much work they've been taking from the IronPython team when doing this sort of work.

Matthew Trumbell

Posts: 7
Nickname: taft
Registered: Mar, 2006

Re: Java and Other Languages: What Gosling Really Said Posted: Mar 23, 2006 9:35 AM
Reply to this message Reply
> John Roth:
> PHP may well be 100 times as slow as well tuned Java in a
> server application, but that's not particularly true of
> the others (except maybe TCL). Java's factor of 3 to 5
> (not 100!) performance advantage over Python is strictly
> due to JIT technology and an early choice of garbage
> collection model that sucks rocks performance-wise. Five
> years from now, neither is likely to be true. Where any of
> the others will be, performancewise, five years from now
> is anyone's guess.

The following page would suggest that Python's performance is indeed worse than the 3-5 times slower you quote: http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=java&lang2=python

Not that this is an authoritative source, but from looking at the other performance tests they did, I'd imagine it would give you a good guideline. Anyway, even 3-5 times slower is absolutely unacceptable in certain contexts. Many real-time systems couldn't tolerate a hit that significant (for example in finance, where speed can often translate into profit).

And I'm not saying that Python won't catch up, as you indicated it might. However, given the fact that Python has been around since around 1990 and Java didn't really come on the scene until 5 years later, I'm not holding my breath that performance is the #1 concern of Python's developers. And to me, that's fine. Every language and platform you choose will have strengths and weaknesses. IMO, one of the requisite skills of a good developer is in evaluated those attributes for each platform and choosing the platform that meets the needs of the project.

> Merridock:
> I still can't concieve of one super-language that is good for everything. Maybe I'm short sighted.

I don't think you are short sighted at all. I think that sums up my position on the matter nicely. And if someone can prove me wrong, I'm all for it. It would sure make my life a lot easier. :)

Jeff Ratcliff

Posts: 242
Nickname: jr1
Registered: Feb, 2006

Re: Java and Other Languages: What Gosling Really Said Posted: Mar 23, 2006 9:59 AM
Reply to this message Reply
"At some level it is hard to criticize C# because they just copied the Java spec."

This is the kind of comment that makes it hard to take Gosling seriously. If C# copied the Java spec it must be cross-platform, right?

Sure, C# was influenced by Java and other languages just as Java was influenced by C++, Pascal and more recently C# itself.

Gosling would be wise to follow Stroustrup's example and avoid making language comparisons, particularly if one of those languages is Java.

Matthew Trumbell

Posts: 7
Nickname: taft
Registered: Mar, 2006

Re: Java and Other Languages: What Gosling Really Said Posted: Mar 23, 2006 10:19 AM
Reply to this message Reply
> This is the kind of comment that makes it hard to take
> Gosling seriously. If C# copied the Java spec it must be
> cross-platform, right?

Not that I disagree with your larger points, but this is just silly.

There are three seperate concepts here: language, platform and framework. Java is a term used to describe all three. .Net is a platform and a framework.

C# is only a language, and like most other languages, says nothing about the platform on which it will run. You could, theoretically, write a compiler for any platform which would generate binary. However, the only capacity in which MS supports C# currently is with a compiler that generate CLI code which is executed by the .Net runtime.

Other than a few libraries in the larger .Net framework which depend on MS technologies, there is NOTHING preventing .Net (the runtime and framework) from being ported to other platforms. In fact, just like Java, .Net was designed to be portable. Probably the only reason MS hasn't ported it to other systems is to protect their own interests.

Until MS officially ports .Net, enjoy one of several open source .Net implementations on other systems. Like mono, for instance: http://www.mono-project.com/Main_Page

Jeff Ratcliff

Posts: 242
Nickname: jr1
Registered: Feb, 2006

Re: Java and Other Languages: What Gosling Really Said Posted: Mar 23, 2006 11:03 AM
Reply to this message Reply
I don't disagree with what you are saying but in the context of comparing the Java spec and C# you have to assume that language, platform, and framework are all included. Otherwise a comparison doesn't make sense.

Although there are .Net implementations on other platforms and they are probably quite useful, they can't run all .Net applications. For that reason, I don't like to make an argument based on their existence.

Matthew Trumbell

Posts: 7
Nickname: taft
Registered: Mar, 2006

Re: Java and Other Languages: What Gosling Really Said Posted: Mar 23, 2006 11:43 AM
Reply to this message Reply
> Although there are .Net implementations on other platforms
> and they are probably quite useful, they can't run all
> .Net applications. For that reason, I don't like to make
> an argument based on their existence.

Were I a guessin' man, I'd say you are probably referring to the lack of cross platform support for Windows.Forms. Given that the vast majority of .Net developers who create desktop applications use Windows.Forms, I guess you are right. However, there is absolutely nothing stopping a person from using Gtk# for their front ends and avoiding COM Interop and the few other "gotcha" libraries tied (almost) exclusively to the Windows platform. I've tried it and can tell you that you can produce a cross platform CLI dll without too much effort.

Actually, though, you could say the same thing about java. Sun includes a wide variety of proprietary classes with their implementation of the JDK. The nice thing there is that they are clearly labelled by package (com.sun.*), so you know if you are using something proprietary.

Another difference is that Sun ports their JVM and SDK to a few different platforms. However, it should be noted that this support isn't universal. For example, I used linux on my Mac back in the day (1998 or so) and at the time Sun's JVM didn't support the linuxppc platform. So you had to use an open source implementation. There, just like with Windows.Form and mono today, you didn't get many of the proprietary sun libraries with the open source JVM. (I'm not sure of the state of java on linuxppc today. However, I'd venture a guess that Sun doesn't support any of the BSDs.)

I guess what I'm getting at is that the Java and .Net platforms are more alike than you might think. They are both theoretically portable, but both have proprietary bits that aren't portable and neither are available for every platform.

Flat View: This topic has 43 replies on 3 pages [ 1  2  3 | » ]
Topic: Java and Other Languages: What Gosling Really Said Previous Topic   Next Topic Topic: Design Enterprise Applications with the EJB 3.0 Java Persistence API

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use