Gosling Didn’t Get The Memo
By Ryan Tomayko under Then they fight you... on 12. March 2006I’ve been blissfully neglecting this site for months with the assumption that a large part of our goal was completed. After watching good people like Martin LaMonica and Jon Udell balance out the mainstream tech press with coverage of lessish tools and languages, and having seen forward looking companies like RedMonk inject themselves into the traditional analyst racket with smart, honest, and unignorable critique, and having seen herds of Java luminaries migrate to simpler, more agile tools and languages, and after hearing Bill Gates say that less code was the only metric, and having watched David, Bill, Ian, Adrian, Phillip, Aristotle, Harry, Mark, Mark, Chad, Curt, James and many other extremely talented programmers dismantle all the common hollow arguments for superfluous complexity and replace them with simple methodologies and working code, after all that I just figured there wasn’t much to do around here.
But I completely forgot about James Gosling:
“There have been a number of language[s] coming up lately,” noted James Gosling today at Sun’s World Wide Education & Research Conference in New York City when asked if Java was in any kind of danger from the newcomers. “PHP and Ruby are perfectly fine systems,” he continued, “but they are scripting languages and get their power through specialization: they just generate web pages. But none of them attempt any serious breadth in the application domain and they both have really serious scaling and performance problems.”
We’ll get back to that in a second.
I believe that a majority of people in IT now consider dynamic languages like Perl, Ruby, Python, and PHP to be very much capable of sitting at the table with Java and .NET for a wide range of common technical problems. Similarly, straight-forward systems like REST, Microformats, and Atom are generally considered legitimate alternatives to the vendor/analyst/press peddled technologies like WS-* for a wide range of integration issues. In other words, I could walk into most shops during a technology evaluation and put these technologies on the table as legitimate considerations without being too worried about being laughed out of the room. This is not to claim superiority for a given task, just that the competitive playing field is beginning to level off.
This was not the case last year at this time, so what happened? Something must have changed. None of these technologies underwent huge feature or stability increases in the past year. I’m unaware of any breakthrough in scaling these systems past what they’re already capable of. There have been some improvements in running dynamic languages on the mainstream VMs, which many predicted would lead to quick acceptance, but that’s not it either. So what changed?
Minds changed. Respectful debate, honesty, passion, and working systems created an environment that not even the most die-hard enterprise architect could ignore, no matter how buried in Java design patterns. Those who placed technical excellence and pragmaticism above religious attachment and vendor cronyism were easily convinced of the benefits that broadening their definition of acceptable technologies could bring.
The people who are still unconvinced are those that just don’t care or are too lazy to spend a small amount of time researching and validating the arguments, which brings us back nicely to James Gosling’s recent statements.
On The Current Quantity of Language
“There have been a number of language[s]
This part is notable because it’s actually true. There have, in fact, been some number of languages. While I stand steadfastly by James’ analysis of the current quantity of language, we will quickly diverge in opinion from here.
A quick note to aspiring Java pundits: play close attention to the next few statements. While none of them have any basis in reality, they have proven sufficient in creating fear and uncertainty in the minds of those who are evaluating these technologies.
On “Scripting Languages”
“PHP and Ruby are perfectly fine systems,” he continued, “but they are scripting languages
James pulled this directly out of “Effective Java Advocacy Beans”, section 6.8.3 “Dealing with questions on dynamic languages”:
First, call anything not statically compiled a “scripting language”. Attempt to insinuate that all languages without an explicit compilation step are not to be taken seriously and that they are all equivalently shitty. Best results are achieved when you provide no further explanation of the pros and cons of static and dynamic compilation and/or typing and instead allow the reader to simply assume that there are a wealth of benefits and very few, if any, disadvantages to static compilation. While the benefits of dynamic languages–first realized millions of years ago in LISP and Smalltalk–are well understood in academia, IT managers and Sun certified developers are perfectly accepting of our static = professional / dynamic = amateurish labeling scheme.
This technique is also known to result in dynamic language advocates going absolute bat-shit crazy and making complete fools of themselves. There have been no fewer than three head explosions recorded as a result of this technique.
Also, avoid the term “dynamic language” at all cost. It’s important that the reader not be exposed to the concepts separating scripting languages like bash, MS-DOS batch, and perl-in-the-eighties from general purpose dynamic languages like Ruby, Python, Smalltalk, and Perl present day.
We’ve tried our best to clear up any ambiguity related to the term “scripting language” in the past:
- Wikipedia: Scripting Language describes the difference between specialized scripting languages and general purpose dynamic languages.
- The State of the Scripting Universe Van Rossum, Thomas, Hobbs, Conway, Pall weigh in on this misconception and others.
- Web Dominated by J2EE? is a rant on an article spreading the same misinformation.
- Arrogance, ignorance, and a blinding Sun is David Heinemeier Hanson correcting the same misinformation somewhere else.
- RADlab, scripting and scale, a blog entry by Gosling saying the exact same stuff and a comment thread full of people correcting Gosling’s dated evaluation of dynamic languages.
On “They Just Generate Web Pages”
and get their power through specialization: they just generate web pages.
Gosling shows his ignorance regarding the current feature set provided by dynamic languages and what people are using them for. A cursory glance over rubyforge.org’s project tree reveals that the number of projects that “just generate web pages” are really quite small: 151 of 1,342 total projects are registered under Internet::WWW/HTTP::Dynamic Content and many of those projects are related to using the web (HTTP/URIs) as a platform for integration more than they are for “generating web pages”. I expect Perl and Python break down even wider.
Update: Seo Sanghyeon provides a list of popular Python related applications that have nothing to do with generating web content.
I’d also like to note that exposing resource representations via HTTP/URLs has been moving into areas other than “generating web pages”. This was the plan when HTTP was originally designed but has only recently begun to really catch on. Specialization and enhanced capabilities related to generating and serving hyper-media over HTTP are and will continue to increase in value. The web server is becoming a key piece of integration infrastructure. What James refers to as “generating web pages” is now a general purpose technique for exposing resources to anything outside of the application process.
On “breadth of application domain”
But none of them attempt any serious breadth in the application domain
It’s hard to determine what kind of breadth is missing when you consider the capabilities provided by modern dynamic language environments, the platforms they run on, and the extensions and bridges that allow them to use damn near any other program or library available. James uses the example of “interplanetary navigation”, which is a really good example except that it isn’t; most of us aren’t working at NASA and those of us who are working at NASA are doing things like trying to get the payroll and accounting systems working together or building simple productivity applications. Gosling seems bent on meeting the needs of the 20% while leaving the 80% with a platform that’s losing bids to dynamic/agile shops.
“That’s the kind of power I do not envy”.
Lastly, Peter Yared (former Sun hacker) and the rest of the folks over at ActiveGrid should also be interested to learn that no one is attempting to widen the viability of dynamic languages in the “application domain”.
On Scaling and Performance
and they both have really serious scaling and performance problems.
It is simply not possible for me to add anything to the massive set of material addressing this topic.
Scalability:
- Why PHP Scales
- Large Scale PHP
- The PHP Scalability Myth
- The J2EE guy still doesn’t get PHP
- IBM poop heads say LAMP users need to “grow up”
- It’s boring to scale with Ruby on Rails
- Does Ruby on Rails scale? A clear and definitive answer
- New Take On Scalability
- Scaling with Rails
- What’s all the fuss about Ruby on Rails
Performance:
- High performance PHP
- A subjective analysis of two high-level, object-oriented languages
- Making the Case for PHP at Yahoo!
- Is Ruby Better Than …?
- RailsExpress.blog
Why people are upset
There have been multiple responses to Gosling’s statements ranging in sentiment from outrage to amusement:
- Curt Hibbs: It’s sad, James Gosling is clueless
- Chad Fowler: Gosling Thinks Ruby Just Generates Web Pages
- David Heinemeier Hansson: Pay no attention to the heathens and Distinguishing power from versatility
- Assaf: James Gosling Explains what’s wrong with Java
- James Robertson: The Static Empire gets Nervous
- Frank Wiles: Seriously funny
All we’re asking is that you stop spreading misinformation about the current state of dynamic languages to the press, analysts, and your customers. This does not require you to champion or otherwise support these technologies – just stop lying about them. One year ago, this type of behavior could be attributed to a lack of documentation and discussion on these issues, today it’s impossible to attribute to anything but malice.
Seo Sanghyeon:
On “They Just Generate Web Pages”, Python has…
etc ad nauseum. What do they have to do with generating webpages?
comment at 12. March 2006
Danno:
Here, here!
lesscode can’t go away until morecode has been staked through the heart, buried in a Cemetary surrounded by moving water, with it’s head severed, placed in a silk bag, it’s mouth stuffed with garlic and rose petals, and consecrated by an Eastern Orthodox Priest.
comment at 12. March 2006
Anonymous:
I would add Lua to the list of Dynamic Languages.
While it is not a ready-to-go package with lots of std libraries, it is quite fast, small, customizable and has a strong and very smart community.
Regarding the rest of your article, I’m with you 100%.
comment at 12. March 2006
Alex Bunardzic:
I wouldn’t downplay the ’scripting’ aspect, Ryan. Scripting is exactly what scares the shit out of Gosling and other application evangelists.
A script is not an application. And that’s exactly where it’s strength lies.
This is similar to how spreadsheets used to scare the shit out of people who based their careers on building financial applications. Eventually, they were forced to accept the fact that non-application specialists are going to take over and do their own financial shit using spreadsheets. They had to learn to move on.
Gosling is keeping his head in the sand. Even the hypothetical future interplanetary staff, which he dragged in as his crown argument, will be writing scripts instead on relying on statically typed Java applications to guide them while they hurl through the space.
comment at 12. March 2006
Fredrik:
Goslings comments was the funniest thing i’ve read this year. I have a feeling that “interplanetary navigation” will become some kind of standing joke/meme. We are now free to dismiss any technology that lacks “interplanetary navigation” features.
I think this applet is the closest anyone have gotten to actually do “interplanetary navigation” in java.
Seriously though. James Gosling is a troll. No reason to waste time on him, other than for the amusement value. Besides, he doesn’t do “interplanetary navigation” so nobody in their right mind would take him seriously.
comment at 12. March 2006
assaf:
I don’t mind if Gosling uses “scripting languages”. Beyond the buzz and fud, scripting and dynamic are just features of the language. Features themselves are not that important.
What’s important? Can do vs. get it done. Java can do. PHP, Ruby, Python, get it done.
Interplanetary navigation is still a dream of a far off future. Serving Web pages is the meat of Internet applications, enterprise applications, software as a service. It’s where most of the development is taking place.
If you only remember one thing, that Java is about interplanetary navigation, not serving Web pages, that’s enough to summarize everything that’s wrong with Java.
comment at 12. March 2006
erikh:
I still think that all of this language war stuff is malarky. Many languages fill very well-defined (or in some cases, better performing) domains and should be used there. Really, what programmer is worth his salt that only knows and writes in one language? Nitpicking over (relatively) vague terms like “enterprise” and “applications” seems like something that belongs in a marketing conference or board room than in any technical discussion whatsoever.
What I guess amazes me more is that someone like Gosling, with his education and apparent experience, is so worried about having his Ivory Tower renovated, has resorted to the technical equivalent of ad hominem attacks.
comment at 12. March 2006
Steve Reno:
What a maroon.One word: Jython.
(All the power, none of the crap.)
comment at 12. March 2006
Ryan Tomayko:
Alex said:
Yes, but there’s an important distinction that’s not being made here. There are languages specialized for a certain task that are incapable of being used for anything else. I think
bash
is a good example of a specialized “scripting language”.bash
is for chaining commands together. That doesn’t make it bad, it just makes it limited to that specific problem domain. Which, again, is perfectly fine and correct and the best possible way of performing that task. I wouldn’t want it any other way.But Ruby, Python, Perl, Smalltalk, etc. are not specialized scripting languages. They are general purpose programming languages. I believe one of the reasons the term “scripting language” has stuck with them is partially because it’s become so common to create mini-languages (i.e. DSLs) in dynamic languages that are specialized for certain tasks. So it’s sometimes hard to separate the specialized pieces from the general purpose pieces. Contrast that with static languages, where you are forced to create a completely separate “scripting language” when you need to provide a constrained/specialized language (this is why XML is used so heavily in Java for things like O/R mapping, dependency injection, configuration, build processes, etc. — XML is Java’s scripting language). In dynamic languages, you are generally not required to leave the core language to get that specialization: you use techniques like meta-programming and DSLs or just include/require/use some designated file at a designated point and let it do it’s thing with the API.
Using a general purpose language but extending it in places that would traditionally require “scripting” is the fundamental design principal behind Rails, Django, TG, Seaside, etc.
When someone unfamiliar with modern dynamic languages and experienced in Java hears someone say, “they’re scripting languages, and get their power through specialization,” they are being misled into thinking that these languages are like
bash
and can be used only for a single specialized scenarios, which is obvious not the case: they can be contrained and specialized as much or as little as required and become useful in multiple specialized scenarios. That’s really important.Now, what I’m not entirely sure about is where PHP fits in all this. PHP was originally very much specialized for generating web content and that’s its forte to this day. Like bash, this seems to be working extremely well. Is PHP more suitable as a “scripting language” like
bash
(albeit for generating web content) or a general purpose language like Ruby?comment at 12. March 2006
Aristotle Pagaltzis:
Ryan: it’s hard to put PHP in any category. It’s geared heavily toward generating web content, though it can also be used outside the context of a web server, and such code doesn’t end nearly up as grotesque as, say, writing servers in bash using netcat. But PHP has such weak metaprogramming facilities that I wouldn’t use it for anything other than its main domain, and even that is just because of its ubiquity.
comment at 13. March 2006
Eugene Lazutkin:
You forgot to mention one vastly popular dynamic language: JavaScript. It looks like lowly JavaScript with its Ajax creates the next generation of client-side applications, while Java applets went nowhere in this direction. Need more proof? ;-)
comment at 13. March 2006
Keith Wright:
I think it might be nice to mention that while a lot of concerns about performance are overblown and FUD, there is a point at which performance becomes a real issue, which many have a habit of handwaving and say that you can always optimize that part to C.
I am an application programmer, and while huge chunks of the program have very little cause to be concerned about performance (Dialogs and DB I/O and such), real world applications find themselves having to deal with larger and larger datasets, and more and more computations. In these portions of the program performance cannot be ignored. The difference between being able to handle 1,000,000 and 10,000,000 data points is the difference between a sale and no sale.
So when I see how a language like Ruby does in performance tests, often 100 times slower than the leader, I have to ask myself whether it has any place in application programming. Dynamic language designers shouldn’t forget that computers are still very much valued in their ability to do computations (hence the name!) and they should’t cede the whole program space to the venerable compiled warhorses.
comment at 13. March 2006
twifkak:
When I was, like, 10 years younger (and too young to care about dynamic languages or beautiful code), I visited the home of KIPR fellow Dave Lavery, who happens to work for NASA. He was showing off to me some code he had helped write that — guess what — actually did interplanetary navigation. And guess what — it was in LISP.
Now, 10 years ago, I was 12, so don’t bet your life that my facts are straight. It may have been a prototype of the real thing, but I don’t think that it was. From what I recall, it was real-time image analysis logic that helped one satellite automatically maneuver itself into connecting with another, via video camera.
comment at 13. March 2006
alan:
I’m no expert, but dissing dynamic languages because they don’t do “interplanetary navigation” is just contrarian unhistorical blather. When NASA wanted a space ship to navigate under its own autonomous control for the first time (Deep Space I, in a planetary shadow), it had the ship’s computer run dynamic LISP code. Why? So solutions could be dynamically provided, if needed, and so that the basic code would be smart. But hey, I’m no expert. Ask Norvig. Lisp has its dynamic nature, even when most of what it’s running at the moment may be fully-compiled. Python can do many of the same tricks…and choice is good.
comment at 13. March 2006
Ryan Tomayko:
Actually, he does:
comment at 13. March 2006
Anjan Bacchu:
hi there,
James Gosling did a lot of work on LISP to build Emacs.
I guess there’s a perspective of someone who’s done a whole breadth of applications using Java. We all know that ruby/python can be used for 80% of the applications that java can be used. But we know(from the 80/20 rule) that the only 20% of the journey is done when you say that 80% work is done. The last 20% takes 80% of the effort. If you’re happy with the 80% work, fine.
When he specifically says that breadth is NOT there in the other languages, you should NOT jump to conclusions about his motives. If you ask Bjarne Stroustrup about C++, he is known to defend C++’s successes in a wide area of applications(which is wider than java’s). Gosling has higher motivation that Bjarne ever did to keep their created languages going but at the same time we should not put ignorance and ill-motives.
Even though one tends to accept/recognize when the trade press like to sensationalize such things, I feel terrible when a PhD/M.S talks like a Slashdotter/high schooler/”Digg”er. You expect more from people who have an M.S — after all they don’t go to such schools just to learn Compilers.
BR,
~A
comment at 13. March 2006
andi:
Good old Albert knew it: It’s all relative. Dynamic, static, assemblique. Who the f* cares. Use what’s good for the job in order. Noone would use a dynamic language in a team of 30 developers in a company with a beaurocratic mindset. Neither would the open source guy who cares about solutions, clarity and beauty use a monster language like Java. The right tool for the right people for the right job. Peace and all be happy…
Just to add another use of dynamic languages in big corps: Python for example is used by SAP for internal IT automation. This is stuff used by thousands and thousands of people on a daily basis internally (and the SAP IT is something that actually works.. producs are another thing;)). But they use Python in their products too. For example TREX (a search engine), it even includes a Python TCL GUI. And just another note here: They just closed the Java consulting depeartment in germany - a “strategic decision.”
comment at 13. March 2006
Harry Fuecks:
Perhaps it’s time to nail down the term scripting language - my vote goes for “Anything with a virtual machine is scripting language” - then James might not feel so left out.
“Just to add another use of dynamic languages in big corps: Python for example is used by SAP for internal IT automation.”
Just random note along the same lines Oracle (10g for Windows) and IBM/Rational (used by both ClearQuest and ClearCase) both install Perl 5.6 in their default Windows installs.
comment at 13. March 2006
Or Something » Gosling Didn’t Get The Memo:
[…] read more | digg story […]
pingback at 13. March 2006
BarryD:
I do find it somewhat telling that you’re happy to bang the drum for scripting in the form of Perl, Ruby et al, and hammer on about scalability but you fail to mention VBScript.
No wait, I’m serious. It fufils all the criteria you’ve mentioned above. ASP is scalable, if you’re sensible in your coding. Want a different problem domain? Excel automation, I’ve seen trading houses and banks where prediction and reporting models are built in Excel using VB for Applications. Want to automatic your OS, write shell script equivilants? Windows Scripting Host and, again, VBScript files.
So whilst it may not be trendy, it may not be open source, it may not have some word of mouth marketing scheme behind it the lack of VBScript’s inclusion in your mind’s list of scripting languags may show more snobbery than Gosling.
comment at 13. March 2006
RichB:
BarryD wrote:
Indeed, ask.com was for many years getting along fine with a VBScript-based website. I worked for another company who found they had to use 45 web servers to run their EJB site rather than the 30 which it took to run their VBScript site.
Now, both of these websites had backend systems which weren’t script-based. The former was Teoma and the latter was Oracle. Perhaps the lesson here is that front-end websites simply don’t need ultra-fast micro-benchmarked platforms.
comment at 13. March 2006
Anonymous:
So this is what respectful debate looks like? Sorry, I thought it had something to do with honestly entertaining the possibility that other opinions might actually be valid.
I am currently engaged in writing an enterprise application. The parts in Java can scale to dozens or more computers simply by using the facade pattern with stateless session beans calling POJO’s. Now, how am I supposed to do that with the part written in Python? Zope? I don’t think so.
comment at 13. March 2006
Thought Leadership:
Why Ruby Doesn’t Matter…
You may have noticed that pretty much everyone in the Ruby camp are insultants with many of them being book authors attempting to capitalize on hype. I of course, will remain open minded that Ruby may be better than say Java at some tasks but for the…
trackback at 13. March 2006
emilian:
Oh what a great post, really proved Gosling wrong. Come on! What would you like for the man ?? Come upfront and say : we are all doomed! let’s lay onto the ground and wait to die ?
Java kicks ass because of the JVM. And there are already tons of other languages built on top of that JVM (jython, jruby anyone ?)
In the Java 6.0 , we’re going to have Javascript (aka Rhino from Mozilla) included so perhaps “scripting languages” will get better and better on the JVM.
Java itself is evolving probably better than other languages and it has the best API you need. Because in the end no language is that special but a good API saves you from a lot of trouble.
Why isn’t there any free Lisp (for commercial usage) with an API the size of Java (or at least threading + platform independent GUI + networking stuff) ?? I like Lisp and Python and I’ve used Jython quite a lot at some point, but for for corporate work you really can’t choose on the desktop side something else except Java or .NET (so we choose Java).
comment at 13. March 2006
Cees’ Blog » Blog Archive » Lesscode dissects Gosling’s FUD:
[…] In Gosling Didn’t Get The Memo a statement by James Gosling that is too dumb to be true (but alas, it is) is dissected. Along the way, the article churns out a very long list of links to sites and blog posts containing ammo for fighting the Java crowd (and their associates over at C# central, etcetera ). Because of that, it’s an article worth bookmarking. […]
pingback at 13. March 2006
Lukas:
http://www.googlefight.com/index.php?lang=en_GB&word1=java+nasa&word2=php+nasa
comment at 13. March 2006
George:
You seem to have a big problem with the term “scripting language” as Gosling used it. Well lets dig in a little bit further on that.
What is a scripting language? I mean, whats the bare bone of it, technically spoken? It is a language executed as script. That means it is called (from somewhere), then loaded, executed and ends, thats all, and what concerns me, I’m perfectly fine with that. Its the same for me if it is interpreted, pre-compiled into P-code (or similiar) or executable, CGI or Fast-CGI, module or stand-alone, as long as it behaves like intended I’ll befine.
So why all the fuss about it? Why does Gosling mention it anyway, why are so many users/programmers upset with the term “only scripting”?
I think the main reason is that there are different programming philosophies behind the kind PHP (Ruby, Perl etc.) on the one side is used in programming and Java is on the other side. Thats all, simple like that. Whereas a “scripting” language is executed and dies afterwards (which has its advantages like rapid development, ease of deployment etc. as mentioned above and in other linked pages), a “compiled” language does not (need to have, so it may use caching/pooling/memory objects much more efficient and has not to rely on backend systems and their performance that much).
In my opinion that was what Gosling meant saying that scripting languages “[..] have really serious scaling and performance problems.”. Okay, distilling all these into such a little sentence like Gosling did has a taste of FUD, but nevertheless Gosling may have relied on the fact that people who read his interview are a little bit technically educated (and even I did not point out anything that new until now either).
So shame on Gosling, he could have made his point more clear on that. But on the other hand I do not have to read “Effective Java Advocacy Beans”, section 6.8.3 to see another kind of FUD raising on.
And of course I could do application programming using scripting languages.
I can do something very similiar to scripting in compiled languages too, using JSP or ASP or whatever… I do not see the point.
Just my $0,02
comment at 13. March 2006
twifkak:
Anon:
Well, maybe if you spent “a small amount of time researching and validating” your arguments, you’d know how. I do.
George:
Wow. You just described every program lacking an infinite loop.
Would you “befine” if I changed the term “P-code” to “JVM bytecode” in your above sentence?
That’s because the JSP expression language is a dynamic language, albeit not a general purpose one.
Sorry, all, if I just fed the trolls. The troll patrol may take me away, now.
comment at 13. March 2006
Diário de Leonardo Boiko » Blog Archive » Gosling acha que Ruby só gera páginas web:
[…] Agora é oficial: o autor de Java não entende de linguagens de programação. […]
pingback at 13. March 2006
Baptiste:
Makes me think of a part of the old MS Windows EULA, which states:
“Because this product contains Sun’s Java, it is not safe for air transport and nuclear powerplants”
comment at 13. March 2006
George:
twifkak:
Did I? Well I just wanted to nail down what a script does. And scripting languages normally do lack an instance with an infinite loop that may serve as container for pooling etc. - thats the punchline.
Why should I not “befine” with that? All I wanted to point out is that it is the same for me how the script is executed. And although speaking of scripting languages at that point you could i.e. use java like normal CGI (but I think no one would rather like to do that).
Sorry but JSPs are not dynamic as such, even if the expression language suggests otherwise. They are compiled and loaded into the virtual machine where they reside for the applications lifecycle and can interact with the complete JVM. By changing the JSP file, the container (like Tomcat) recognizes the changes, re-compiles and re-loads it only once for further use. They do have the look’n’feel of dynamic languages but, honestly, they are not.
And if someone thinks I’m trolling along, please feel free not not to read my posts.
Cheers, George
comment at 13. March 2006
petrilli:
The reality is that large chunks of mission control @ NASA as well as the Space Telescope Sciences Institute (the people who run the Hubble) use Python to manage their missions to interplanetary destinations. This was true a few years ago, anyway. The idea that Java is somehow capable of a larger breadth of problems is absurd. It may have a better fit to some problems — though I’ve yet to figure out what those are, other than increasing my use of mediocre developers — the Turing completeness proves this false.
As for scalability. It might affect you, it probably doesn’t. Worry about it if it does. The number of customers I run into who think they have “scalability” issues is mindboggling huge. The number who actually have it? Almost zero. I’ve had 1 customer in 10 years who had a real challenge. The rest are just fooling themselves into buying into a more complex solution because it makes them feel good.
comment at 13. March 2006
Denyerec:
I believe chunks of the game EVE Online are coded in Python and that, clearly, involves interplanetray navigation.
Doh ;)
comment at 13. March 2006
mmcclellan:
Java’s evolutionary step towards Lisp has been important and in some ways helped pave the way for Python and Ruby. See I think it’s wrong to suggest that Python and Ruby are targeting the 80% of Java projects. I think the target is 80% of Lisp and Smalltalk. Now that Java and by extension C# have dragged programming half the way to Lisp, the next step seems smaller and practically inevitable. In some strange way Helsberg seems to have a better grasp of this than Gosling (strange in a Turbo Pascal v. Emacs way), as evidenced by C#’s Haskell inspired LINQ stuff.
I’ll quit before this becomes a Paul Graham post, but suffice it to say, Gosling would do well to familiarize himself with what Ruby gets right.
comment at 13. March 2006
A Random Pixel » James Gosling Didn’t Get The Memo:
[…] The best rebuttal on this topic I found was by Ryan Tomayko. […]
pingback at 13. March 2006
Sam:
More and more of my projects are ending up in Scheme (Gambit-C to be precise). Dynamic language during development, compiled when it is time to deploy.
comment at 13. March 2006
Isaac Gouy:
“This was not the case last year at this time, so what happened? Something must have changed.”
Nothing mysterious - Ruby on Rails marketing & hype.
comment at 13. March 2006
XML Is Java’s Scripting Language - Coder’s Eye:
[…] Great article at Lesscode.org, responding to Gosling’s dismissal of scripting languages. […]
pingback at 13. March 2006
Sebs:
Dear Mr. Gosling:
You got Beans, we got Balls (and Free Time left)
comment at 13. March 2006
Or Something » Gosling Didn’t Get The Memo:
[…] read more | digg story […]
pingback at 13. March 2006
Just Words » Effective Java Advocacy Beans:
[…] Read Gosling Didn’t Get The Memo […]
pingback at 13. March 2006
grammada:
4th paragraph. Should be either:
“None of these technologies underwent huge feature or stability increases in the past year.” (Removes ‘have’)
or
“None of these technologies have undergone huge feature or stability increases in the past year.” (Changes ‘underwent’ to ‘undergone’)
but not
“None of these technologies have underwent huge feature or stability increases in the past year.”
No thanks necessary.
Thanks anyway — Ed.
comment at 13. March 2006
Alex Bunardzic:
Ryan said:
The situation you describe parallels closely the situation in real (non-virtual) world. In everyday situations we also see a number of specialized languages (non-programming languages), that are constrained and therefore limited in one way or another. For instance, some people occasionally use smoke signals to communicate messages. Others use semaphores, the blinking lamps, etc.
These languages are severely limited (which is exactly why the Monthy Python skit presenting Emily Bronte’s “Wuthering Heights” with actors using flags for semaphores to engage each other in a dialog is so hilarious).
Still, such languages are a subset of the ‘general purpose’ natural languages (and their dialects thereof). So, English is a general-purpose natural language. Its subset, Roger-Over-Out, is a rigid language used for most of the wireless human-to-human communications occurring today (there is also the less famous ‘Able, Baker, Charlie’ language, known and used by all radiophone operators in the services).
This is an excellent point. It reveals why static languages are not real languages – they need other languages to constrain them. Something’s wrong with this picture. A real language shouldn’t need an extra language to constrain it.
Another bang on point: real languages are context sensitive. Change the context, and the interpretation of the language constructs changes.
If I may borrow an example from the natural languages – if someone in everyday situation suddenly starts waving a flag above his head, that could get easily misinterpreted as being an act of patriotism, of flag desecration, and many other things. But if the context for the formal semaphore-based communication is first proposed, than the flag waving attains much more clarity. This is what we may refer to as ‘metaprogramming’.
In other words, such languages are context-sensitive. Can static languages be made context-sensitive?
In other words, they require more intelligent handling. No wonder bureaucrats despise such languages – they assume some brain power behind the powers that use them. Not a desirable scenario in the bureaucrats’ worldview.
It depends. On several factors, one of which is the nature of the team using the technology.
comment at 13. March 2006
Gábor Farkas:
Anonymous:
you do it the same way in python. using stateless objects. by not keeping the state on the server (but in the database), you can have as many servers to handle the requests as you want. and it scales. in python, in ruby, in php. in a C++ cgi. wherever you want.
please understand, that the advocates of the dynamici languages do not say that java can’t scale. they are only saying that dynamic-lanugages can scale as well.
and please note, that the java answer was not always POJO. there is a reason why POJO has a name (plain old java objects, iirc). some time ago, the standard answer you got to any java+web question was : use j2ee. later some people found out that maybe they don’t need that whole j2ee monster, maybe simple java objects are enough…
comment at 13. March 2006
Aristotle Pagaltzis:
Alex:
Whoa, slow down there, easy on the big claims.
Why not? What has typing got to do with any of it? Do yourself a favour and learn a type-inferenced, statically typed language (which in practice means one of a set of pure functional languages) – Haskell, OCaml, Clean, whatever.
It’s metaprogramming that matters, not typing.
comment at 13. March 2006
twifkak:
George said:
Okay, sorry. I overreacting. Thanks for not returning the favor.
Said George:
The FastCGI method was chosen specifically because it does have an infinite loop. Unlike C, VM-based languages such as Ruby, Python, and Java have associated initial load times just to get the VM into memory. This makes them bad candidates for the typical “script-based” (by your definition) CGI. So, in all but the most idiotic setups, webapps written in Ruby and Python are not being run like scripts. Rails, for instance, allots one database connection per thread, and that connection is persisted for the life of the server.
Furthermore, many, many, many, many, many, many, many, many, many Java programs are run as a “script.” Ant, to name but one.
By “dynamic” (which is, I grant you, a loaded word) I was referring to the typing. While, when coding Java, your IDE blinks angrily at you when you try to call
new Integer(5).trim()
, you’ll get no flak from JSP EL, because there, types are not evaluated until runtime. You could say<c:out value="${foo.stuff}" />
in the view, and from the controller, pass objects of two entirely different classes that implement the getStuff() method. That’s duck-typing, my friend, and that’s dynamic.The technical details of how it manages this dynamicity are of no importance to me (and, in fact, it was touched on above that Lisp is a fully dynamic language that can be interpreted or compiled). Now’s my time to step off my high horse — why are the technical details of the fact that JSPs are compiled-then-run vs interpreted important to you?
Also Sprach Alex:
That’s stretching it. They don’t need the XML languages. For many of the config files I can think of — log4j, Hibernate, Ant (if you’re some sort of nutty nut girl who’s nuts) — you can programmatically configure them in Java code. People don’t, however, because the Java code ends up looking even uglier than the XML files.
comment at 14. March 2006
Martin J Steer:
Wow… isn’t is wasteful to spend all the time you save by using ruby/python et. al., instead of java, writing vitriol-filled comments here?
I can’t for the life of me understand why someone is upset that the father of Java still prefers Java, I’d be more surprised if he’d prefer something else. Do I get to be really pissed of if Guido doesn’t prefer Java over Python? Do I get to raise hell if Matz prefers Ruby over Lisp? Pretty please?
Gosling is a Java adovate, what the hell is he supposed to say?
regards,
martin
comment at 14. March 2006
Ryan Tomayko:
RTFA! No one is suggesting he champion, support, or advocate anything, just that he stop spreading information that’s provably incorrect. It’s stated precisely in the article.
Do you lie about anything that’s not your preference? Does being a Java advocate give Gosling a license to say whatever he wants without any kind of basic fact checking or respect for basic, fundamental scientific process?
comment at 14. March 2006
developers.org.ua » Blog Archive » языковые войны: Джеймс Гослинг о неполноценности скриптовых языков:
[…] Неудивительно, что такого рода комментарии вызвали широкую ответную реакцию. В качестве одного из достойных ответов рекомендую пост с lesscode.org: Gosling Didn’t Get The Memo. Аргументы апологетов “скриптовых языков” сводятся к следующему: […]
pingback at 14. March 2006
twifkak:
martin something said:
Yes. Yes, it is. :P
comment at 14. March 2006
Ahsan:
Do Databases Rot the Mind?
comment at 14. March 2006
Adler » Blog Archive » Entrevista de James Gosling:
[…] Na minha opinião, um comentário inútil, porque estas linguagens estão dentre as que mais crescem. Principalmente o PHP. Segue abaixo os links para a entrevistas e para as respostas a esta entrevista feitas pelo Ryan Tomayko . A entrevista por ser encontrada aqui E os comentários do Ryan aqui PS: A Entrevista e os comentários estão em inglês. […]
pingback at 14. March 2006
Anand:
Not only Gosling , the whole Internet world depend on Java !, Since due to development in many opensource projects such FOP , XML , Apache , Eclipse and opensympony will lead Java to be the King of Internet Kingdom !!
Javageek !
comment at 14. March 2006
Remi Broemeling:
As Denyerec has implied, EVE Online would be a good example of enterprise, non-web-page usage of Python. See the technical FAQ, section 7.4.
I guess no-one told CCP that they weren’t allowed to use Python to create non-webpages?
comment at 14. March 2006
Isaac Gouy:
GIGO
Do you have a sufficiently accurate source text for this kind of phrase-by-phrase analysis? Do you know the full context in which the remarks were made?
Parsing every phrase of the prepared keynote address might have thrown up something interesting, but is it really worth doing for a second-hand version of an extemporary answer to a question from the audience?
The last item in this blogger’s transcript gives different source text for the same Question & Answer - parse away.
If that is the case why do you feel the need to respond so strongly against something that verges on gossip?
comment at 14. March 2006
Alderete:
I don’t understand what all the fuss is. Who cares what James Gosling thinks? He’s an obviously interested party, with a party line to spew. There are lots of industry luminaries, all spewing their corporate lines.
The thing is, as you point out in your article, the knowledge that this is spew is well-documented. Either now or in months or in years, everyone who can have their mind opened will have their mind opened, just by the current motion and inertia that platforms like Rails and PHP possess today.
By arguing with Gosling, it’s making his words more legitimate. Like there’s a debate here. There’s no need for debate. We don’t need to prove him wrong with articles and blog posts. We just need to keep successfully building real, working systems using the tools that we feel are appropriate.
As the current Nike commercial (running during college basketball) says, “Let your game do the talking.”
comment at 14. March 2006
twifkak:
Good post, Alderete.
comment at 14. March 2006
Aristotle Pagaltzis:
twifkak:
Haven’t you really just validated the point, though? You are effectively saying that Java does not have the facilities necessary to create DSLs which can express configuration more tersely than XML. Now if we agree on the premise that less code is better, wouldn’t that mean Java actually needs XML?
comment at 14. March 2006
twifkak:
Woah… logic.
comment at 15. March 2006
Straw Dogs Code Blog » Blog Archive » Sun’s Gosling on Ruby and PHP:
[…] Scripting Languages? That comment jars a little as its a far out dated term normally reserved for cheap pot-shots. I’ve had numerous discussions with Java advocates in which Ruby, Python and any other dynamically typed language has been dismissed as a meer scripting language. It doesn’t look like I’m the only one either as Ryan Tomayko at Lesscode.org seems to have paid comment to Goslings post in quite some depth and I recommend a read! […]
pingback at 15. March 2006
midtoad:
James Gosling says “PHP and Ruby are perfectly fine systems… [snip] … they just generate web pages”.
You know, he’s almost right.
Not: they JUST generate web pages.
But: JUST they (and Perl and Python) generate web pages.
Java doesn’t generate web pages. That is, virtually no one is using it for that. Just look at the projects on sourceforge - I went looking for a CMS recently. I found dozens of such tools written in PHP, and very few in Java. Using Java for web development must not be very easy, popular or productive.
comment at 15. March 2006
notes » Blog Archive » Dynamic languages and choosing a technology for a project:
[…] An extended post responding to James Gosling’s Java is Under No Serious Threat From PHP, Ruby, or C# (that site, java.sys-con.com, is the worst I’ve enountered for quite a while with regard to ad content — annyoing pop-up DHTML ads not caught by Firefox’s pop-up blocker, a million flashing, blinking, and whirling ads. awful): I believe that a majority of people in IT now consider dynamic languages like Perl, Ruby, Python, and PHP to be very much capable of sitting at the table with Java and .NET for a wide range of common technical problems. […] The people who are still unconvinced are those that just don’t care or are too lazy to spend a small amount of time researching and validating the arguments, which brings us back nicely to James Gosling’s recent statements. […]
pingback at 16. March 2006
Michael Stepanov Blog » Blog Archive » About Java:
[…] Personally I don’t like Java because it seems like a just product of high-quality PR. I don’t want to minimize the Java importance. it’s an excellent solution for certain goals but it isn’t unique, it isn’t absolutely universal! Hovewer, Java adherents think differently. From their point of view there are not anything noteworthy except perfect, brilliant, ideal Java! James Gosling - father of Java confirmed this thesis in his interview: “Java Is Under No Serious Threat From PHP, Ruby or C#”. One of many discussions can be found there. Dear Java-programmers, please, be more modest. Other programming languages are not so weak and useless as you can think […]
pingback at 16. March 2006
Alex Bunardzic:
Aristotle Pagaltzis wrote:
If I define a certain player as being a type, and I’ve made a decision to cast that player as a type while I was being governed by the contextual circumstances, when the context changes, that type will have a hell of a problem getting out of the cast.
In James Bond movies, Doctor Evil is cast as an archetypal villain. Let’s say the overal context, or bias, of the James Bond movies changes for some reason, and now Doctor Evil needs to be portrayed as a mankind’s benefactor. How easy will it be to pull such a stunt?
Some serious metaprogramming will be required. How believable will the pulling the wool over someone’s eyes be? Will that stunt be conducive to the discipline of less code?
comment at 16. March 2006
A Bigger Soapbox [@lesscode.org]:
[…] SYS-CON Media publisher/editor Jeremy Geelan, a fine chap who interviewed The Father of Java just the other day, contacted me about re-publishing Gosling Didn’t Get The Memo on sys-con.com. This is the same site that published Gosling’s original remarks. […]
pingback at 17. March 2006
Aristotle Pagaltzis:
Please just learn a language with type inferencing before you make any further statements or simply don’t say anything at all. More trademark nonsensical metaphors will not make you look any smarter; really.
comment at 17. March 2006
John Smith:
Uh, has anyone actually asked James what he really said?
comment at 17. March 2006
Isaac Gouy:
John Smith:
See the Artima comments
comment at 17. March 2006
Gosling and The Memo at reinventnow:
[…] Gosling Didn’t Get The Memo [@lesscode.org] One year ago, this type of behavior could be attributed to a lack of documentation and discussion on these issues, today it’s impossible to attribute to anything but malice. […]
pingback at 17. March 2006
Thought Leadership:
More Thoughts on Ruby and Why it isn’t enterprise
I previously blogged on Large Enterprises and why they don’t care about Ruby and was rightfully accused of bashing folks in the Ruby community but not providing the answer to my original statement. Figured I would set things right…
trackback at 18. March 2006
Middleware Matters:
Proof of “The Language Divide”
As I mentioned in my previous post, my latest IC “Toward Integration” column, entitled “The Language Divide,” attempts to explain why there’s a dearth of scripting/dynamic language use in the traditional standards-based middleware space. If you wo…
trackback at 19. March 2006
Wordpress » Blog Archive » Distinguishing power from versatility:
[…] UPDATE: Ryan Tomayko has a great post called Gosling Didn’t Get The Memo that explains and link to the sea change we’ve seen over the last year or more. […]
pingback at 19. March 2006
Dennis:
Wow. Deja vu all over again. I just read through this entire blog and was transported back to 1972 (or so) when I first encountered programming. My aging brain recalls very simular emotional arguements from LISP vs. Fortran advocates. Maybe future shock won’t get us after all. Things haven’t changed as much as I had thought ;-)
comment at 21. March 2006
John:
Actually, and i realize James was pointing primarily at the newcomers to the dynamic language crowd, NASA has used Lisp extensively in the past.
In Peter Siebel’s book, Practical Common Lisp, he relays an anecdote from Eran Gatt regarding the use of Lisp in the Deep Space 1 mission in 1998, specifically pointing out the usefulness of having a read-eval-print loop available on a remote piece of hardware. And Lisp was, in fact, doing the navigation.
More relevantly, perhaps, is that the bug which needed to be addressed concerned a race condition due to the concurrent nature of the software, not any of the type-safety or other shallow bugs that might be addressed by adopting Java instead.
Just thought it worth a mention.
comment at 21. March 2006
Richard:
Java is ugly. It was ugly when it was born (Smalltalk-like VM + C syntax). And now Java is an even uglier 10 year old. Java’s older sister, Self, is now a fine 19 year old, though only available on Mac OS X (fine by me). Someone needs to tell Gosling his baby was ugly then, and even uglier now. Java is the new legacy, the new COBOL. Just as COBOL development continued after its natural life, so will Java. REST and WSDL will let us still use Java on life support until we replace it!
Dynamic languages are making a resurgence, not a comeback since they never really went away, and for many it will be a good, productive and profitable time. Leave Java to the masses as they wallow in suffering…just code around them in the fast lane.
comment at 21. March 2006
thoughts.on.code » James McGovern::thought leadershit:
[…] Yes… Several bloggers have jumped on James Gosling indicating he didn’t get the memo. This post asks for the following: All we’re asking is that you stop spreading misinformation about the current state of dynamic languages to the press, analysts, and your customers. This does not require you to champion or otherwise support these technologies - just stop lying about them. […]
pingback at 22. March 2006
Bertus:
Alex Bunardzic wrote:
It’s called parametric polymorphism (fragments of System-F) in conjunction with type inference (Hindley-Milner type unification), and it’s been understood now for decades. Maybe you’d like to learn about it…
Untyped so-called “dynamic” languages are nice for many things, but eschewing statically typed languages simply due to ignorance about how type systems actually work, and what the state-of-the-art is capable of, is really just foolish. Sadly, it seems to be the norm in these times.
comment at 22. March 2006
Achilleas Margaritis:
The way a program is translated to machine code has no relation to what the program can do. A compiled language may offer very little capabilities, and a scripting language may offer much more capabilities, and vice versa. The real reason dynamic compilation exists is that it makes changing code more flexible than when precompiled.
Mr Gosling’s reaction is a good indicator for what I have been suspecting all these years: Java encourages bloatware. And this has nothing to do with the fact that Java is precompiled or dynamically compiled (from source code to machine code, that is, not bytecode); it has to do with the language itself.
comment at 22. March 2006
Isaac Gouy:
As we’re still talking about Mr Gosling’s reaction, the new transcript on Artima is similar to what’s spoken on the conference flash video, 33:25 through 37:25
comment at 22. March 2006
Sex, Drugs & Compiler Construction » Gosling didn’t get the memo:
[…] Statisch getypte Sprachen sind ja sowas von out. Also im Grunde genommen waren sie schon immer lästig und im Weg, aber so langsam scheint sich die Erkenntnis auf breiter Front durchzusetzen. Nur James Gosling scheint es noch nicht begriffen zu haben. […]
pingback at 24. March 2006
It’s a free world, baby… » Java vs. PHP:
[…] In besagtem Interview, von welchem ich bisher nur kleine Ausschnitte lesen konnte, soll Gosling vor allem durch Ignoranz gegebenüber “Scripting”-Sprachen wie PHP, Ruby und ähnlichen “geglänzt” haben. Die Debatte unter “Gosling: Java vs PHP a Moot Debate” enthält unter anderem einen relativ kurzen Beitrag von Bruce Eckel, in welchem er auf eine etwas längere Antwort von Ryan Tomayko hinweist: “Gosling Didn’t Get The Memo”. […]
pingback at 26. March 2006
Isaac Gouy:
Ryan, you were quick to make a personal attack on James Gosling accusing him of spreading misinformation and malicious lies, as-soon-as the tabloid headline version of his comments was reported.
It’s been 5 days since the his real comments became available on Artima (video and transcript).
It’s been 4 days since Curt Hibbs wrote “Reading the actual transcript shows a much more reasonable point of view” and retracted his criticism.
Perhaps you too should reconsider your comments.
You accuse James Gosling of using the term scripting language to denigrate PHP and Ruby by associating them with more limited language implementations like bash.
And then you do what you accuse him of - you use the term dynamic language to hype PHP and Ruby by associating them with more powerful language implementations like Lisp and Smalltalk.
In “Why PHP Scales - A Cranky, Snarky Answer”, George Schlossnagle writes “PHP (and scripting languages in general)…”.
In “Java is the SUV of programming tools”, Philip Greenspun writes “a scripting language such as PHP or Perl”.
In “Confounding: Sun vs. Scripting Languages”, Peter Yared writes “…scripting languages like PHP and Ruby…”.
You may prefer a different phrase, but that doesn’t mean George Schlossnagle or Philip Greenspun or Peter Yared or even James Gosling are spreading misinformation.
You say James Gosling is ignorant of the many different things that PHP and Ruby are used for (he mentions PHP 7 times, Ruby 1, Python 1, Perl 0) because he characterizes them as languages that just generate web pages.
And then you use PHP / Ruby on Rails ‘generate web page’ examples for 13 of 15 links on Scalability and Performance.
When you present that many ‘generate web page’ examples it becomes understandable that an outsider like James Gosling has the impression that PHP and Ruby are just used to generate web pages.
You accuse James Gosling of spreading misinformation about the current state of dynamic languages, presumably including the current state of PHP and Ruby performance.
And you do what you accuse him of - as one of only 5 performance references you link to a 6 year old comparison of miniscule Python programs to Blackdown JDK 1.1.7, rather than a comparison of standalone PHP or Ruby with Java HotSpot 1.5.
In “Why PHP Scales - A Cranky, Snarky Answer”, George Schlossnagle writes “…PHP being naturally slower than Java (something I believe to be true)…”
JRuby implementor Charles Nutter blogs “…Ruby’s troubles with performance are fairly well-documented… Again, Ruby’s struggles with performance are widely known.”
Not misinformation, not malicious lies: widely known.
comment at 27. March 2006
6th Sense Analytics » Blog Archive » Java v Ruby: flame on:
[…] That said, the “debate” around James’ comments became rather polemical. Responses from Ruby followers in particular indicated the language does have the scalability and power to build more than web “just” applications. […]
pingback at 27. March 2006
Toby:
Baptiste wrote:
I was so shocked, shocked! at the idea MS would slip this into a EULA, that I had to verify it. Sure enough, in Backoffice 2000 Server’s license (for example), I found:
http://proprietary.clendons.co.nz/licenses/eula/backoffice2000server-eula.htm
Interesting, but I guess nobody reads licenses anyway.
comment at 29. March 2006
Isaac Gouy:
Toby, it’s in SUN MICROSYSTEMS, INC. BINARY CODE LICENSE AGREEMENT
“3. RESTRICTIONS … You acknowledge that Licensed Software is not designed or intended for use in the design, construction, operation or maintenance of any nuclear facility…”
comment at 29. March 2006
Hynek’s scribbles » Blog Archive » Static vs. Dynamic:
[…] There is an ongoing discussion because of some claims made by James Gosling about dynamic languages. […]
pingback at 30. March 2006
Carl:
Why are Ruby and PHP scripting languages? Simply because they are only useful as ‘glue’ between programs which do the real work. If I use for example PHP, I have a web-server written in C, which uses a Module written in C to execute a language which uses Libraries written in C to access a database-server written in C. Can you write all this stuff in PHP? If not, PHP is only usable for scripting or with other words for glueing componentes together.
Thats not that bad, such kinds of languages are usefull and neccessary. If you look at alle those examples of successful usage of those languages you see, thats they are always uses as glue. In games for example you need a glue language for game-logic, a DSL which allows the game-designer to specify logic without recompiling the whole engine. So the engine is written in C/C++ and the game-logic in some DSL. And why not use a existing language as DSL, maybe Python or Ruby.
In Java I use a web-server written in Java, huge libs, written in Java to access a db-server written in C (I also could use a db which is written in Java, there are some). You can do this in Java and not in PHP so PHP is ‘only’ for glue - hence a scriping language. Same goes for Ruby (even if ruby is a much better language then PHP, but also so slow that its nit possible to write even the runtime-libs of ruby in ruby without having an unbearable slow program).
About Lisp: Everybody who writes about how Lisp is used in performance relevant appilcations should take a look at the code of these applications. In Lisp you can type your program statically to improve performance (look at ‘declaim’, ‘declare’ and ‘proclaim’ functions) and if you really want a Lisp program to compete performancewise with Java, you end up writing a statically typed program in Lisp using lots of declares which fix the types of nearly everything. But of course no one here knows that, because its not about truth, its only about hype.
Maybe those scriping language will replace languages like Java sometimes. Computer are getting faster and at some point in time you can even affort a 100 times slower language to gain some comfort. The same happend with C and Java: Javas is in average about 50% slower then C because of the gc and certain design decisions but it don’t matter much because of the gain of productivity. But can the gain of productitivy justify a 10-100 times performance loss if you compare Java to ruby? At least not now I suppose.
comment at 31. March 2006
Aristotle Pagaltzis:
Carl:
By that token, Java must be a scripting language, since running a Java VM written in Java inside a Java VM would be very slow.
Anyway, even PHP has the socket functions and the other stuff that you’d need to write a webserver. The argument holds water only because the the PHP interpreter is tied to a webserver, which makes it practically impossible to write dæmons.
For all the other popular dynamic languages, the argument does not hold. It is perfectly possible to write a webserver in pure Perl, Python or Ruby, and in fact Rails and Catalyst ship with such included for development purposes (although neither is not particularly optimised or feature-complete, so is not recommended for actual deployment). The same is probably true of Django, though I don’t know about that.
But that is not a given. Two or three years ago we have someone at the local LUG who gave a talk about how they wrote a pure-Perl webserver which got them much better performance than they could achieve using Apache + mod_perl.
Speed is not a particularly big problem for dynamic languages. Memory consumption is a much greater sticking point. F.ex. I generally use the libxml2 bindings for Perl rather than pure-Perl XML parsers to do XML processing; the extra speed is a nice bonus, but the real reason is that building a DOM for even a moderately large XML document using Perl data structures consumes mindboggling amounts of memory.
However,
You can pin the types down retrospectively as needed, instead of burdening yourself with a static type system during development. It turns out that selectively strictening a loose type system is more productive than selecting weakening a static type but just as performant. Static typing is an optimisation; we all know what they say about premature optimisation, right?
Smalltalk is pretty damn fast these days – without type declarations. How do they do that?
Take a look at OCaml. This is a strongly typed, type inferencing, purely functional language. Any piece of OCaml code can operate on different types much like code in dynamic languages, but the compiler checks that the types it is invoked with are compatible with regard to the operations performed. You avoid most (but not all) of the drawbacks of static typing while getting all the benefits of static typing despite only rarely specifying an explicit type – yet the compiled code is faster than C++.
Languages have a long way to go yet, no doubt, but one thing is already clear: ALGOL-derived static typing is detrimental and will be left behind sooner or later.
Even for interplanetary navigation…
comment at 31. March 2006
Carl:
You can write the Java VM in Java too, the problem is the bootstrapping, because no OS can execute Java by itself, so you need at least some loader in assembler. Its implemented this way in the JNode-OS, a pure Java OS with drivers, VM etc totally written in Java. Can you do something like this in PHP or Ruby?
Sure, there are Webservers written in Ruby and Python - but without big parts of the libs written in C those would be unbearable slow. And even so, they can’t stand against Apache speed-wise. In comparission: I’ve benchmarked Tomcat against Apache on my system and to my own surprise Tomcat came out noticeable faster - even if I tested only the delivery of static content.
Look at the actual shootout-pages for benchmarks. Sure those are microbenches - but microbenches are mostly a problem for java because of the dynamic recompilation in the vm which makes programs run more slowly in the beginning. But Ruby or PHP are hideous slow compered to Java in most benches. Only exceptions are benchmarks where most time is spend in libs like regular-expression-matching or simmilar. Only there, because of the highly optimized C version in the runtime-lib PHP and Ruby can perform similar to the java-implemented re-lib in the java-standard-libs performance wise.
Thats not bad for a scriping language, because performance isn’t relevant for scripting purposes as long as it don’t takes an eternity. But for application development performance does count, many people are still bashing Java because of its alleged poor performance.
Yes, you can have dynamic languages which are faster - but even Smalltalk and Lisp can’t compete to Java normally. Same for Perl which is also faster then Ruby and PHP. Only Lisp can if you use lot of type constraining declares. So to get comperable performance in Lisp you also have to program in a way comparable to Java.
And you are right, memory consumption is a problem too. Java is a well known memory hog, but if you substract the usage of the vm and the loaded standard-libs (which takes more space then the optimized libs for Ruby for example which are written in C) you see that Java uses noticable less space then Ruby for most oo-based applications. I think the reason is that in Ruby each object is implemented as a hash-table, while in Java objects are implementes like C structs. It’s obvious why this costs much more memory - but it’s not obvious how Ruby can made more optimal without totally redefining its runtime semantics.
All things have a certain price: In Ruby the price of the comprehensive runtime meta programming is a increased memory consumption and a reduced performance. In Java the price for the better performance is the static types you have to use as a programmer (and I for myself don’t even consider static typing as a burden, but thats different topic).
Static typing is an optimisation, but also compiler verifiable documentation and specification. I know, there are people refuse to see those both last points and see static typing only as a burden, not as a means to help you even in the design process.
Because of its runtime model which is very different from the runtime model of Ruby. And even Smalltalk (which is the oo-language with the most effort in efficient execution ever - even most concepts in the Java-VM are derived from experiences with Smalltalk) isn’t comperable to java performancewise. It’s fast enough for a wider range of applications compared to Ruby - and it’s not a scripting language. No one ever called Smalltalk ’scripting language’. And guess why…
I know OCaml very well. And yes, it’s fast (but not always as fast as C++, only in certain areas). But guess what: It’s totally static. Not a bit of dynamism. Compared to ocaml I even Java is a dynamic language. So I don’t see your point here. And of course no one ever called ocaml a scripting language too. Guess why….
I agree with you in this point. But dynamic typed languages like ruby won’t be the future too. Look, dynamic typing is as old as programming languages. Even assembler is dynamically typed. And Lisp as one of the oldes higher-level lprogramming language is also dynamically typed. So all people who thik that dynamic typing is some kind of new trend, are way off the mark. The reason why dynamic typing has some kind of ‘revial’ in the moment is the hype created by RoR and the increasing computing power of todays computers. So you can affort a slower language to a certain degree now - but only in specific areas. Remember that Smalltalk is around for more then 30 years now - and it never make a breakthru. So why should Ruby change that now?
I think the future lies more in statically typed languages with very sophisticated type-systems which give you much more expressive power then the type system of languages like Java has. But dynamic typing is and was only a kludge to have a certain level of expressiveness without going thru the difficult task to create a good type system. Everybody can create dynamically typed languages - it’s in fact totally simple. But not everybody is able to crate a powerfull and expressive type system like for example a language like Haskell has. Thats the reason why there are so many dynamic typed languages, not because dynamic typing is something sophisticated.
comment at 31. March 2006
Carl:
Oh, I forgot: You can find the benchmarks here:
http://shootout.alioth.debian.org/
For example: Simple recursive function evaluation (ack, fib and tak).
Java: 4.23s, Ruby: 1393.77s, PHP: Timeout, Python: Timeout
Binary-Trees:
Java: 8.23s, Ruby: Timeout, PHP: 519.68s, Python: 82.77s.
As long the language really has to do the work on itself, PHP and Ruby and to a lesser degree Python are very slow.
comment at 31. March 2006
Isaac Gouy:
Carl, also see the flawed benchmarks page - yes, the point of scripting languages is to script stuff written in other languages.
Aristotle, “Smalltalk is pretty damn fast” doing what? compared to what? (Smalltalk is included on one of The Computer Language Shootouts)
And remember The Computer Language Shootout compares programs - maybe the programs aren’t as good as they could be…
comment at 01. April 2006
Patrick Logan:
I don’t have any numbers at hand for current Java or Lisp compilers. This is certainly not true for the Stalin compiler for Scheme, for example. Stalin generates much better code for Scheme than any Java compiler I am aware of.
Of course the Stalin approach to Java would pay off about as well as for Scheme. But then you’d have to wonder why the language was so less expressive. You may as well use Scheme. So this comparison of Java and Lisp is more the result of where compiler developers put their effort than on anything inherent in the languages per se.
comment at 01. April 2006
Isaac Gouy:
Stalin is installed on The Computer Language Shootout but no one has contributed programs.
comment at 01. April 2006
Carl:
The problem is that Stalin only works with relativly static and also only with “closed-world” programs.
If you want to do Ruby-like metaprogramming or dynamic class loading and creation like in Java, its approach won’t work. It works best if you do numerical programming because Stalin detects some common usage patterns and creates optimized code for those patterns. But for other usage patterns which are very common in your average Ruby or PHP program, Stalin won’t give you much benefit (or won’t even work because it don’t support the whole Scheme standard).
There where many attempts do full-program type propagation/inference etc. with dynamic programming languages but none really worked for a wide range of real programs. The reason is that if you have a dynamic programming language, progammers are really using this dynamism and then it’s impossible for any type-inferencer to succeed. And if a programmer really takes care to program in a way a type-inferencer can type a dynamic program to a static one, then he also can write those types down from the beginning.
comment at 01. April 2006
Patrick Logan:
Stalin is also a decade old. The combination of applying Stalin-like compilation to partially-closed-world modules, with Anamorphic-like hot spot code generation, etc. could combine to get overall great results.
Stalin is an approach you’d apply to larger chunks of code you expect to be in production for some longer period of time, e.g. weeks or months. Partial-compilation to “unroll” some of the dynamism might make more of the code available to a Stalin compiler.
I think my general point is that if you only think of a compiler as something like what Kernighan and Ritchie developed thirty years ago then, no, C or Java will almost always out perform Ruby for sufficiently CPU-bound examples.
comment at 03. April 2006
Jon Rowett’s Workblog » Ruby, Java, C#, Mullah Omar, Timothy Dalton…:
[…] Thanks partly to some ill-advised comments from James Gosling (and other "thought leaders" (snigger)) on the Ruby language, it looks as if there’s some real bad blood between the Ruby and Java camps at the moment. This seems strange, because one of the three main reasons* I chose to learn Ruby is because of the amount of interest it’s generated in the .Net world recently - I just haven’t seen any hostility from the .Net people towards Ruby, but I’ve seen stacks of it from rank-and-file Java developers. […]
pingback at 05. April 2006
somewhere in… colourful moments » Digg PHP’s Scalability and Performance:
[…] Several weeks ago there was a notable bit of controversy over some comments made by James Gosling, father of the Java programming language. He has since addressed the flame war that erupted, but the whole ordeal got me thinking seriously about PHP and its scalability and performance abilities compared to Java. I knew that several hugely popular Web 2.0 applications were written in scripting languages like PHP, so I contacted Owen Byrne - Senior Software Engineer at digg.com to learn how he addressed any problems they encountered during their meteoric growth. This article addresses the all-to-common false assumptions about the cost of scalability and performance in PHP applications. […]
pingback at 10. April 2006
Does not compute » Blog Archive » When Jini’s roamed the earth:
[…] In preparation for working on the specs for HLVM (High Level Virtual Machine) I have been brainstorming on what the future of languages and language features might be. Something that is high on my list is a better conceptual model for dealing with multiple processors. While describing the sort of system that I was envisioning a coworker mentioned that what I was saying sounded like Jini, that Java related technology that never really seemed to get going. So today I decided to do some research on what Jini was all about and how those ideas could benefit my current line of thinking. In this article(page 4 specifically) from 1999, Bill Venners who went on to found Artima speaks to Bill Joy and then James Gosling. James, who as you may know has had some problems recently with the dynamic language community had some interesting things to say about the way programmers use the language HE designed. Bill Venners: So given that it was more perceived along the lines of embedded devices, or that’s how you thought of it, would you say there are deficiencies in Java for the enterprise environment, or areas in which you could do better at the language level? […]
pingback at 19. April 2006
JavaStation Builder NetWork 2006 » Digg PHP’s Scalability and Performance:
[…] Several weeks ago there was a notable bit of controversy over some comments made by James Gosling, father of the Java programming language. He has since addressed the flame war that erupted, but the whole ordeal got me thinking seriously about PHP and its scalability and performance abilities compared to Java. I knew that several hugely popular Web 2.0 applications were written in scripting languages like PHP, so I contacted Owen Byrne - Senior Software Engineer at digg.com to learn how he addressed any problems they encountered during their meteoric growth. This article addresses the all-to-common false assumptions about the cost of scalability and performance in PHP applications. […]
pingback at 19. April 2006
Paul:
If these “scripting languages” are supposed to replace Java, then why aren’t they used like Java/C++ for building middleware layers? Seems like developers would use them for this purpose if they fit.
comment at 21. April 2006
Patrick Logan:
Every use of LAMP is essentially using these “scripting” languages for middleware.
To see something that might be cast in a more familiar “middleware” light, check out ActiveGrid.
Their motto is “Tap the power of LAMP for service-oriented applications”.
comment at 21. April 2006
Paul:
I guess you could classify apache as middleware, but the scripts like PHP aren’t really doing the middle job, apache is.
Now if you wrote a webserver or an ORB entirely with PHP, then it would be middleware. And that’s my point no one is doing such things with PHP because it’s not meant for that sort of thing.
comment at 21. April 2006
Isaac Gouy:
Patrick Logan wrote:
I’ll echo and amplify Paul’s reply: Every use of LAMP is essentially using these “scripting” languages for glue – they “assume the existence of a set of powerful components and are intended primarily for connecting components together” (John K. Ousterhout).
comment at 25. April 2006
» Ruby je větší konkurent než Java, říká Don Box:
[…] Don Box v zápisku Gosling on Ruby po delší době upozornil na určité ignorantství Jamese Goslinga, duchovního i „biologického“ otce Javy, který rozhovorem Java Is Under No Serious Threat From PHP, Ruby or C# zahrál mnoha příznivcům dynamických jazyků na jak na city, tak na vášně :) Asi nejlepší reakcí, jakou jsem viděl, je Gosling Didn’t Get The Memo. […]
pingback at 27. April 2006
XOOPS CHINA - WordPress » Digg PHP’s Scalability and Performance:
[…] Several weeks ago there was a notable bit of controversy over some comments made by James Gosling, father of the Java programming language. He has since addressed the flame war that erupted, but the whole ordeal got me thinking seriously about PHP and its scalability and performance abilities compared to Java. I knew that several hugely popular Web 2.0 applications were written in scripting languages like PHP, so I contacted Owen Byrne - Senior Software Engineer at digg.com to learn how he addressed any problems they encountered during their meteoric growth. This article addresses the all-to-common false assumptions about the cost of scalability and performance in PHP applications. […]
pingback at 26. May 2006
Morves:
Well, as for the “interplanetary navigation” issue, maybe we should hear from a NASA employee (Sean Kelly) what he thinks about Java and dynamic languages:
http://oodt.jpl.nasa.gov/better-web-app.mov
They have been using TCL/TK (dynamic language) to build GUIs for years, replacing C++. He says Java is “not fun” and far less productive than PHP, Python or Ruby for web development.
comment at 06. July 2006
cnemelka:
I’ve seen a 70 year old carpenter put up a wall faster with a hammer than a 20 year old carpenter using a nail gun.
I have been programming for 26+ years and try to learn a new language every year. My favorite still being C, but I rarely ever consider using it.
I’ve seen great systems written in languages most of you have never heard of (EDL anyone?).
I’ve seen crappy systems written in Java/C/C++/VB/Lisp/Algol/Forth,etc,etc, etc. Compiled, interpreted or compiled to bytecode then interpreted, whatever.
I’ve seen great systems written in those same languages.
I’ve seen excellent programmers who have no idea why their software turns a high-end ORACLE RDBMS Server into an expensive brick.
I’ve seen excellent DB admins who think that PL-SQL is the only language you should ever write in.
I’ve seen countless projects fail because of issues at layer 8 of the OSI model (politics=Layer 8, for those of you who think there are only 7 layers)
I’ve seen excellent programmers who think that all their code performance problems are because the network is slow.
I’ve seen a lot of things in 26+ years.
And I only wish to make two comments (neither original):
1) People are more important than technology.
2) It’s a poor musician that blames his instrument.
And leave two pieces of advice:
1) Implement technology based on a deep understanding of the problem/business/project/requirements,etc.
2) Learn what you do not know.
–cnemelka
comment at 20. August 2006