Java is Dead! Long Live Python!
Version 3.0 of Python has been released. Notably Python has again done something Java has long resisted: it has broken backwards compatibility with Python 2.x. Notable fixes include a much saner string processing model based on Unicode. I am told by my Pythonista colleagues that a lot of other weirdnesses such as the print operator and the meaning of parentheses in except clauses have been cleaned up as well. Though I don’t expect all Python programmers to upgrade immediately (and version 2.x will be maintained for some years to come) version 3.0 is clearly a simpler, better, saner language than version 2.x that will enhance productivity and make programmers’ jobs more fun. Bravo for Python. This is clearly a living, evolving language.
Java by contrast, is dead. It has at least as much brain damage and misdesign as Python 2.x did, probably more; yet Sun has resisted tooth and nail all efforts to fix the known problems. Instead they keep applying ever more lipstick to this pig without ever cleaning off all the filth and mud it’s been rolling in for the last 12 years. They keep applying more perfume when what it really needs is a bath.
Backwards compatibility was maintainable and useful through about version 1.4 of Java, but it completely broken down in Java 5 when autoboxing and generics moved the core language beyond any hope of comprehensibility. Autoboxing was a misguided effort to paper over Java’s early decision to have a segregated type system for primitives and objects. It was Java’s Plessy v. Ferguson decision that pretended primitives and objects were separate but equal; but the claim was no more true in Java than it was in American jurisprudence. A separate primitive type system may have made sense in 1995 when CPUs were slower and virtual machine technology was not as advanced. Today primitive types just complexify the language to no particular benefit. Autoboxing would not have been necessary or even considered were backwards compatibility not worshipped beyond all other gods.
Generics are another case where backwards compatibility took a good idea and warped it into something horrible. Multiple design compromises were made to enable genericized code to run in older VMs, most notably type erasure. Then, in the end, binary compatibility was broken anyway. However no one went back to the drawing board and considered how much simpler and more powerful generics could be if they redesigned without worrying about backwards binary compatibility.
Closures, if added now, would only make the situation worse. Closures might be a nice addition to the language if and only if Java simultaneously removed inner classes and made all other syntactic changes necessary to support true closures. Otherwise closures will just be generics squared. New features simply cannot be added on top of the current weak foundation unless we’re willing to go back to the drawing board and take things out as well.
I can’t think of another major language as old as Java that still attempts to maintain compatibility with version 1.0 of itself. In fact, I can think of only one language that attempts that (C#), and that one’s half Java’s age. Unless we’re willing to make the hard choices and abandon the legacy as Python has, Java is doomed to the fate of C++ and Cobol: a tool for programmers with long white beards who grew up with the language and have learned all its arcana by gradual accretion and who spend their lives maintaining code written a decade or more ago. Meanwhile a new generation of programmers will abandon Java in favor of more nimble modern languages like Python just as we abandoned C++ in our youth in favor of Java. (Seriously: is anyone under the age of 30 actually reading this site any more?)
Admitting that you have a problem is the first step to recovery. Java has not yet admitted that it has a problem. The language is too big, too complex, and too baroque. Trade-offs that made sense in the era of single core Pentium II’s, 100Mhz processors, and 32 megabyte memory spaces no longer apply. Backwards compatibility has become a millstone around Java’s neck. We’re deep and sinking fast. Until this millstone is cast off, and we correct the mistakes of the past, no further progress can be made.
It’s hard to believe that I first started saying this over five years ago, and absolutely no progress has been made in that entire time. In fact, matters have gotten worse. Maybe Java is a lost cause, and it’s time to fork and replace the language. If nothing else, Java proved that’s possible. Just look what it did to C++. Perhaps it’s time to repeat the experience.
December 9th, 2008 at 10:08 am
One minor nit: the point is not that Java 5 genericized code can be run on older VMs (it won’t). It’s that code using the pre-generic collections library will still run on the new Java 5 VMs.
If you had generics through type reification, you’d need one non-generic collections library for old code and one with generics for the new (generic) code. That’s the main point for type erasure as I’ve understood it.
December 9th, 2008 at 10:28 am
But then, why can’t we all switch to Jython 3.0 once it is ready? This way, you get to keep around your old Java code, but all new stuff is done in Jython.
Of course, Jython is slower. So what. For most projects, it will not matter. And when it does, old folks can write “java code”.
December 9th, 2008 at 11:22 am
Autoboxing doesn’t have to be stupid, it just often is. Java’s generics are ok, except for the ? super and ? extends, which are in the wrong place. They should be declared on the type not on every use of the type. C# 4 implements it the right way, as does Scala.
Reification would be useful, but there are more things you can do statically than Java does with generics; allowing dispatch on type (i.e., static dispatch) would solve a lot of the use cases of reification, and in a better way than reification.
I’m not sure how moving to an untyped language would be a step forwards from Java. Though Python’s syntax is certainly better.
December 9th, 2008 at 11:32 am
I am less than 30 years old. I love Python. I hate Java. Py3K FTW!
December 9th, 2008 at 12:10 pm
Java was my first programming language. I loved it while it hated me. Over the years it screwed me and i grew to hate it! However after i was exposed to python life became better and now i am in love with programming again.
December 9th, 2008 at 12:23 pm
So, how many job postings for Python 3000 are there? How many will there be in 5 years? Answers: 0, and maybe 2 (nationwide).
How many job postings are there for Java? – on Dice.com alone, over 11,000 nation wide.
And, oh yeah, there’s C++, another so called “dead language” – dice.com listings: 5878
Python 2.x: 1164
Tiobe Index (ranking programming language popularity, with a reasonably credible methodology), ranking in order:
1. Java
2. C
3. C++
4. PHP
5. Visual Basic
6. C#
7. Python
… gee, with all that evidence, I better brush up on my Python 3000 skills, or be left behind.
Oh yes, Java is most certainly dead!
And please, oh please Java designers, please do break backwards compatibility, because it will be great to break hundreds of millions (if not billions) of lines of existing production running Java source code, all in the name of appeasing the bitching Java guru bloggers, who prefer design “purity”, and copying so called “cool stuff” from Python 3000, in favor of stuff actually working.
Nevermind that stuff like Groovy, Scala, Clojure, JRuby, Jython, Rhino, et al, are already providing what these people want. Let’s make existing Java source not work, so that we can make Java “cooler” (and not “dead”).
Sorry for my dripping sarcasm. But in the real world, where busnesses depend on stuff working, backwards compatibility is of the the utmost importance. Having “cool stuff”, or design purity, or whatever else programmers like to bitch about, it completely irrelevant to the CTO, or IT manager, whose jobs depend on making stuff work.
December 9th, 2008 at 12:50 pm
JeffS,
The problem is that they pay for the complexity – with exposing their staff to steep learning curves, getting unmaintainable systems that have grown too fat and ugly to be changed, ultimately increasing cost and decreasing quality. They pay for it because the vendors are slow in releasing new version of their tools, such as App servers, because they carry way too much baggage from the past. If your Java 1.4 code did not run on Java5, what would have been the big deal in leaving it on Java 1.4? Why does Java 7 have to pay for mistakes from Java 1.1’s past?
December 9th, 2008 at 12:52 pm
I agree Java is not dead. But I disagree on the reason to break backwards compatibility. It’s not to make the language cool, it’s to clean off the cruft. And there is a good deal of cruft.
But I think Jeff and ERH are referring to two different types of backward compatibility. ERH want’s to break backward compatibility with the compiler and Jeff wants to keep backward compatibility with the JVM. It might even be possible to make both of them happy. Given the version number in the class file it would seem possible for one JVM to execute both types of code.
December 9th, 2008 at 2:09 pm
I don’t want to break backwards compatibility with anything. Not the JVM, or the Java syntax.
But to move forward (yes, I do want progress), I think Java as it is should be mostly feature frozen, with adding to the standard library as needed, and improving existing features. But then progress can come from *other* JVM languages – Groovy, Scala, et al, where those languages can integrate with regular Java (under the hood, they compile to the same byte code).
And perhaps there can be a new Java. Existing Java can be something like “Java Classic”, or “Java Stable” or “Java-doesn’t-break-your-existing-shit”, or something, and the new Java can be “Java 3000″, or “Java-Way-Bitchin’” or “Java-has-latest-cool-stuff”, or, “JavaEZ”, or, ahem, “JavaFX”.
Seriously, this new Java can be very similar to old Java, and integrate with old Java, but clear out old Java’s warts, and add the latest things that developers want to make their jobs easier – closures, proper generics, functional idioms, etc. Then there can be a gradual migration over time to the new Java.
But don’t, under any circumstances, break backwards compatibility, JVM or syntax, with existing Java, risking breaking reams of existing production code.
If that happened, Java actually would be truly “dead”.
December 9th, 2008 at 2:27 pm
I’m 27, and certainly I don’t understand how you can say that C++ is abandoned. I run a whole desktop environment written in C++ (KDE), with some parts of the stack written in C. I only use a desktop app written in Python (Anki), and I don’t want to imagine the nightmare it would be the whole desktop coded in this language.
December 9th, 2008 at 6:24 pm
Java is evolving. Search on ‘Groovy’ and ‘Grails’ and you’ll see that.
December 9th, 2008 at 7:57 pm
JeffS:
You should read Paul Graham’s essay entitled “Beating the Averages.” http://www.paulgraham.com/avg.html
Python may not be the best opportunity for you, but point is that the number of jobs has nothing to do with the quality of those jobs.
Opportunity has more than one dimension.
December 10th, 2008 at 2:19 am
“They keep applying more perfume when what it really needs is a bath”
It is true that good API’s should stand the test of time, but 12 years is out of that scope !
API breaking, whenever it is well documented, is perfectly ok and needed
December 10th, 2008 at 3:00 am
[...] one of my favorites, Elliotte Rusty Harold, in Java is Dead! Long Live Python! This was written by Phil. Posted on Wednesday, December 10, 2008, at 12:59 am. Filed under java. [...]
December 10th, 2008 at 3:57 am
I evaluated programming languages during the last 2 years because I was searching alternatives to Visual Basic which I used for about 10 years now. And before I learned several other languages actively using. I also was doing some maintenance work for PHP or Python driven applications.
Language purity is just one point. There are many others. See my posts The IDE and the libraries or Homogeneous programming style for instance.
I am seeing it from a practical point of view as I am working in a smaller company where productivity is a key factor. And I have chosen Java – now – so it is still attractive from the current point of view without any old applications with already a Java history.
Especially regarding the IDE and regarding homogeneous programming style I was disappointed from Python although I liked the language in general very much.
December 10th, 2008 at 4:02 am
I would love someone to show me a study looking at the differences in maintainability between java and python/ruby/lisp et al.
It has been our experience that the former is more maintainable than the others (comparing similar apps, 1Mloc java vs 150kloc python). The java app is easier to maintain simply because of the tooling support and the wealth of stable open source libraries.
There seems to be a difference of opinion for those who think programming should be “the best tool for the job right now” vs “the best tool for the business long term”. We are in the latter camp after switching to rails early on and having to port everything back due to maintainability issues. Ruby is a dog to maintain due to monkeypatching.
Anyone else?
December 10th, 2008 at 7:01 am
Well, I’m under 30, and I’m reading this, and I’m mainly writing Java code.
I like programming Ruby, and I like what I’ve seen of Python, possibly more than Ruby. I like some of the ideas in Scala, but I think Scala as a language has severely exceeded it’s complexity limit, already by now.
I also really appreciate the good things about Java – and there are lots of them, not only in the JVM. I also personally like static typing generally, though it could be greatly enhanced in Java (structural typing for interfaces, local type inference).
So yes, please go for Java 2 (in real version numbers, not Sun’s attempt at them).
December 10th, 2008 at 7:01 am
[...] Java is Dead! Long Live Python! The Cafes (tags: java python) [...]
December 10th, 2008 at 7:06 am
Complete misunderstanding of two terms: code compatibility and binary compatibility. The author is mixing this and conclusions are irrelevant.
December 10th, 2008 at 7:23 am
For me:
- Java the best platform ever!
- Java the language (syntax) is outdated. I also think that breaking language compatibility would be a good thing. Not to be cool, but to more clear and easier to read.
- Java SDK. I am here with Stefan Tilkov, many pitfalls because of design mistakes years ago (Swing or Date & Time are good examples). Breaking it, would also result in a small JRE.
- Java has exceptional performance. Actually, I think it is the fastest platform available. Many developers argue that performance is not so important, I disagree. Performance is always important and probably in a few years the trend will go back.
- Java is far away from being dead, but I think you just took this title to get more hits
I am currently doing a lot with JRuby and some Groovy. They are great, especially in the context of Web Development. My guess, Java will probably prevail as the dominant language on the VM, but it has to give up some shares to the new kids.
December 10th, 2008 at 8:18 am
It was Bruce Tate, both in his book and blog, who said (paraphrasing), “java is the new COBOL”. The became true with servlet and jsp. In the Corporate world, accreting cruft on top of crumbling foundations is “the way it’s done”. There are COBOL systems from the 1970’s (I’m leaving such an organization in a few days) which now have “java” pixelated UIs (either applet or jsp/faces/etc.) running sequentially processed copybook code (if you know what that means, you know what I mean). Java will remain relevant in the Fortune X00 until those dinosaurs die. The financial services industry is the major offender. Good Lord willing, it will die, and take java with it.
Building “normal” (where the user inputs data into some form, which is then processed) systems doesn’t require low-level languages, necessarily. Even the younger folk are figuring out that such can be driven from a database schema. Habanero/Oslo/LINQ, in the M$ world, are developing just that. With the emergence of industrial strength solid state disk subsystems, 3 or 4 NF databases no longer will be cloaked with the stigma of “it ain’t fast enough”. Nor will they be burden with the explosion of data from flat-file and xml datastores. There will be carnage. The database will do the heavy lifting (and not so heavy, anymore), and the Python/Ruby/whatever screen painter will do the user I/O.
December 10th, 2008 at 9:53 am
5y ago I switched from Java to C and Python, I’ve never regretted the decision.
December 10th, 2008 at 10:41 am
JeffS:
“And perhaps there can be a new Java. Existing Java can be something like “Java Classic”, or “Java Stable” or “Java-doesn’t-break-your-existing-shit””
Uh… what is stopping you from running your current applications on 1.6 (and probably even 1.7)? Do you expect those JVMs to suddenly break? Run your legacy applications on a legacy VM and start working with tools that let you get future work done _faster_.
December 10th, 2008 at 12:15 pm
I use both Python and Java, and both have advantages and disadvantages.
However since this article pours all the mud on Java, and none on Python
let me add a few points where Java is superior to Python:
1) Performance
Python code is several times slower than Java.
Where speed matters, writing Python code is out of the question.
Global interpreter lock doesn’t allow multiple threads to actually
run at the same time.
2) Code analysis
Try picking up a large body of code and analysing it, in Python vs Java.
Because Java is typed there are actually tools to tell you who calls
this function, how this variable is being accessed etc. Not possible
in Python.
3) Compiler finds many errors
There is a certain class of errors that compiler catches for you,
that’s not possible in Python even with pylint. Let’s say you have
a typo in an if branch that only gets executed when you have a rare
error condition, that you cannot cover with unit-tests.
Guess what happens when that error actually happens.
Python code blows up, just when you need it.
While javacc reports an error during compile phase.
If you want quick and dirty prototyping use Python.
If you like to actually think a little before writing code,
like what type of things would this variable hold? use Java.
It’s more typing but results in more maintainable code.
December 10th, 2008 at 12:28 pm
It seems that every year or so somebody declares Java dead. Look at Tiobe. Java is #1, Python is #7. You’re full of crap to say java is dead. Moreover, any gains over the last few years that Python has achieved pretty much match the losses that Perl has had. Unfortunately, Python didn’t learn the lesson from Perl. Breaking backwards compatibility is the kiss of death. Your community will shrink if you dinker with it. Python just assured that the (rather small, by java standards) set of 3rd party libraries that work with python 2 all have to choose between either switching purely to python 3, maintaining both 2 and 3, or waiting and staying with 2. This fragmentation will be a drag that will assure that less total functionality is implemented by the libraries of either platform. This means your libraries will fall further behind compared to those of other languages. People who’ve coded to python 2 and want to upgrade can’t until all the libraries they use are ported forward, which may never happen.
It’s funny to see people so gaga over language features. They’re unimportant compared to the health of the 3rd party libraries produced by the community.
December 10th, 2008 at 1:35 pm
“python rocks Says:
5y ago I switched from Java to C and Python, I’ve never regretted the decision.”
Congrats… 5y from now you will still be jobless.
December 10th, 2008 at 3:27 pm
The premise here is that life requires evolution which implies “progress of new language features”.
What if evolution can be defined in other terms? e.g. Java has evolved into a de facto syntax for systems away from the JVM: e.g. Google Web Toolkit and Android. Can one truly say such a language is “dead” with no evolution ?
December 11th, 2008 at 3:40 am
Most of what I love about Java is either very low level or mostly taken for granted.
It wasn’t the first language to use a garbage collector. But it was the first to popularise the use of garbage collectors and the structure of Java bytecodes allows exact garbage collection. A point that is lost on a lot of programmers, especially the C/C++ variety.
It insisted on run time checking of arrays. The #1 reason for security exploits in the real world.
It insisted on the abolition of hardware pointers. The #2 reason for security holes and bugs.
It uses a set of bytecodes designed such that correctness at the machine-code level can be determined algorithmically. Something you cannot do in most other languages. And that’s a property yet to be exploited in future operating systems.
Anyhow, Python is fun. It has its uses. It has its faults. But its not the language we all hope for. The language that comes after Java. I sympathise with the frustrations of not breaking backwards compatibility. But I hope people don’t lose sight of those four things that make Java such a breakthrough.
So here’s to Java mark 2. The Java we would have designed, given what we know now, but keeping those strengths of design and certainly avoiding the unsafe crap in C#
December 11th, 2008 at 4:21 am
[...] coming out with statements of Java’s demise. But to see Elliotte Rusty Harold in his post Java is Dead! Long Live Python! do it caused me consternation to no end. You may want to check out his web page to get a sense of [...]
December 11th, 2008 at 6:59 am
You started saying this five years ago, and no progress has been made.
Also, Java is as alive and well as ever.
We have closures, we have php running faster on a jvm than off one, we have dynamic scripting languages on top of Java.
We have Java.
Every day I see more elegant solutions to development problems in all spaces by using newer ideas, but it all gets back to simpler implementation and code – fewer bugs, better productivity and mapping 1:1 business requirements to development process.
I have that today. I am not saying you are wrong about backwards compatibility – we have deprecation after all, we also have JVM speed-ups now and the world’s largest open source stacks are Linux / Solaris, GNU, apache, java / glassfish / tomcat+catalina / jetty, mysql and these are all very well aligned to keep growing together.
Code will be runtime optimized, in VM’s. The worlds greatest, fastest, most reliable and proven VM is the JVM, by a huge leap.
What we plug into the JVM, servlets, jsps, beanshells, groovy, jython, etc, or some other domain specific language you design, all adds to the value space of Java, not detracting from it.
I hope a little light went on in your head, and I won’t make fun of you too much for suddenly writing a blog post that “you’ve worked it out” and want to tell everyone the clever news.
JVM + awesomeness == JVM awesomeness, and I defy you to contradict that.
December 11th, 2008 at 7:03 am
As an addendum, I can tell you one dead language. Ruby. Rails has died and people are realizing it.
Sure there is a micro-economy bubbling away but it will peter out as they realize their adoption bar on their business graph keeps stretching and real profits die away.
Rails was one bag of magic coding that was just tripping up on itself.
December 11th, 2008 at 8:33 am
A couple of further thoughts:
1. On Python jobs: at least in the New York area, the demand for competent Python programmers dramatically outstrips the supply. I have seen projects that really belonged in Python written in Java for no other reason than that Python programmers could not be hired. I have also seen programmers who would have been laughed out of most Java shops have their pick of Python jobs because they were the best that could be found. (Yes, many Python devs are fine programmers. My point is simply that the difficulty of finding them means that employers will accept less experience and put up with more incompetence from a Python programmer than a Java programmer.)
2. A different language running on the same VM is still a different language. That proves my point, not negates it.
3. If the cow is big enough, one can feast off its dead corpse for a long time, especially if you keep pouring ever increasing amounts of barbecue sauce on top of it. That doesn’t make it any less dead. Sooner or later it’s going to start to stink.
December 11th, 2008 at 9:11 am
Midlife-crisis, Rusty?
December 11th, 2008 at 9:16 am
I agree with the criticisms levelled at Java’s cruft creep as a consequence of backward compatability, but as many other commenters have also said – this isn’t enough to make a difference for most people.
In the long run Java’s advances and mistakes will be learnt from (e.g. the premature successor in the form of C# is doing some good stuff) but as the man said, in the long run we are all dead.
December 11th, 2008 at 9:41 am
Nitpick: millstones are not what drag people down. It’s “albatross around the neck”.
December 11th, 2008 at 12:30 pm
The best jobs aren’t being offered on notice boards. You’re seeing a lot of maintenance jobs there and very few cutting edge positions – positions where the language that a couple of programmers use today will control the language that dozens of programmers will use on the same project in five years.
I also agree that Java is in a poor state for all the reasons above. In fact, I believe that if Eclipse hadn’t come out, Java would be starting to collapse around now. Eclipse makes you pretty darned productive, and more, it allows people who are basically semi-programmers to generate useful work by using command completion to glue together predefined boxes. But it’s so verbose. Reading the code is quite slow because your brain runs out of “fast RAM” and you lose your mental representation about the first screen in a file when you’re reading the fifth one.
But damn, Python is *fast* to write programs in. I’ve been at this programming thing for almost three decades and I’m still always disappointed in the huge time gap between the conception and the working program. But you can often sit down in front of a text editor and write a reasonable-sized Python program and get up from your chair with it all done *and complete unit tests*.
There are a lot of fundamentally good features that make it fast: the extremely sparse notation, as simple as possible but not simpler – you should read the endless debates about why self is necessary in each method (a decision I agree is correct!) to see how close to the bone they will cut it; the fact that everything is a function and thus you can drop in a mock or fake at any point in your code(*); the fact that most data structures are either a sequence or a dictionary;
The 3.0 move is simply icing on the cake. If there were a Python-based IDE then it would be the best thing since sliced bread.
(* – Seems like every other function I write looks like def Foo(bar, baz, open=open):)
December 11th, 2008 at 2:16 pm
Seconding “python rocks”, I also have been using Python+C for several years to good end. Specifically, Python is for the 90% of code that’s not performance critical, and C for the 10% that is. For the latter, Java is just too bloody slow, and for the former, Python is simply much more pleasant to write code in.
To be sure, not all projects would fall into such convenient parts. Luckily, mine do.
(Disclaimer: I started using Java during its first public alpha, but haven’t used it much in the last 8 years or so. The only thing that even sort of tempts me at this point is GWT…)
December 11th, 2008 at 4:02 pm
[...] however, is the idea of versioning as an enabler to make incompatible changes. Even as the news of Java’s death continues to roll in, it appears Sun is looking to put a mechanism in place that will allow them to [...]
December 11th, 2008 at 11:44 pm
Java is indeed a language for people who get their jobs out of newspapers or off of job Websites; always was.
December 12th, 2008 at 4:25 am
Good luck with Python, Java have things like Unicode from beginning…
December 12th, 2008 at 9:21 am
The problem is the Unicode Java has had since the beginning is broken in various ways, and Java has refused to fix those breakages. They’d rather stay compatible with the original broken design.
Python’s Unicode support had similar breakages, but now in Python 3000, they’ve fixed all that, even though it means the language is not quite the same.
December 15th, 2008 at 11:16 am
What Java needs right now is modularity (slated for Java 7). That will allow API’s to be cleaned up and makes it far easier to manage big applicaties with hundreds of dependencies. That will make far more of a difference to most programmers than an improved implementation of generics or better unicode.
December 16th, 2008 at 11:53 am
It still isn’t possible to abolish primitives without seriously impacting the performance of some types of code. You can make them extendable as “value” types, but those still have quite different properties to regular objects. Sure, computers have got faster, but I still run jobs, written in Java, that push all 4 cores on my machine to 100% for extended periods of time.
December 16th, 2008 at 8:31 pm
I say go ahead and fork a NewJava, and make it perfect.
“The language is too big, too complex, and too baroque.” To you perhaps, who have to write books about it. To me, it’s the best general-purpose language around. Powerful on the server and on the client. Not perfect, but perfectly suited to the tasks at hand.
Backwards compatibility? If that means my applet will continue to run perfectly on all clients as they continue to update their JVM s, then, yes, that’s what I want in a platform.
December 17th, 2008 at 11:48 pm
Not to be “un-original”, but I would just like to say that I 100% agree with people like “Russell”, “Five Years Ago”, and “ben”. Java, like any language, has faults, but anyone who tries to tell me that Python or Ruby doesn’t introduce new faults of their own is either naive at best, or they are flat out lying at worst. The amount of backlash against Ruby/Rails is really starting to grow, not because Ruby/Rails is in any way a “bad” technology. On the contrary Ruby/Rails (& Groovy/Grails also) is extremely good at creating well structured conventional solutions with very little coding effort. But I have personally seen more than one project get scrapped from using Rails and re-written in J2EE when it became blatently obvious that Rails was not going to offer the maintainability and stability that the business required.
The thing I find most compelling to this day about Java is that every time people starting thinking it was “dead”, one year later it showed its ability to adapt to the market and it always came back as being the flagship technology for low cost, flexible business solutions. Remember when we all thought Java would disappear because EJB 2 was such a dismal failure? But then Spring came along and allowed people to re-imagine how they used Java and it came back in FORCE!! With that came Hibernate (another ‘lightweight’ toolset) which, btw, forced the EJB community to totally rethink how they were doing things (which they proved when they brought our EJB 3).
In short, Java has been “dead” many times before. And yes, if the Java community wasn’t willing to change during those times, then it truly would have probably died. But that’s not what happened. The Java community ditched what was broken (EJB2, and other heavyweight toolsets) and brought in newer and better ways of using the language (spring, hibernate/ejb3, the introduction of groovy, etc).
So I’d like to propose the following for those who are interested. Instead of saying a bold (and, lets face it, untrue) statment like “Java is dead”, maybe we should just call it like it is and say, “Java WILL BE dead if we don’t adapt and change X, Y, and Z”. That statement seems to reflect history much better.
This is why I don’t buy into the argument “Java is the new COBOL”. There’s a huge difference there in that COBOL did not try to evolve with change (or at least didn’t try very much). Java has already proven itself willing to make drastic changes to adapt where necessary. To that effect, I agree completely with people like JeffS:
“And perhaps there can be a new Java. Existing Java can be something like “Java Classic”, or “Java Stable” or “Java-doesn’t-break-your-existing-shit”, or something, and the new Java can be “Java 3000?, or “Java-Way-Bitchin’” or “Java-has-latest-cool-stuff”, or, “JavaEZ”, or, ahem, “JavaFX”.
Seriously, this new Java can be very similar to old Java, and integrate with old Java, but clear out old Java’s warts, and add the latest things that developers want to make their jobs easier – closures, proper generics, functional idioms, etc. Then there can be a gradual migration over time to the new Java.” – JeffS
I think this is a superb idea! For certain, there are some core problems with Java that cannot be fixed without breaking backwards compatibility, but business will not go for it when you come in and say “We’ll need to rewrite this in Java ‘Prime’ (or Ruby, or Python for that matter)”. Trust me, I’ve tried. Businesses HATE to hear “convert” and “rewrite”. My boss is about ready to fire anyone on the spot to suggests that these days, and he’s not alone.
So, instead, I think having a new Java ‘Prime’ that can integrate with existing Java code (with perhaps a little work) while itself fixing the core java issues is a great approach! And, just for you Python & Ruby/Groovy fans out there, I strongly recommend that any developer do themselves a favor and learn these languages too! They are great toolsets and have lots of potential for solving many problems. But sometimes, they just flat out aren’t enough and you need a more low level language (Java, C#, C++, etc) to do what you need to do. And in that case, I find Java, even with it’s faults, pretty hard to beat.
December 21st, 2008 at 2:43 pm
@andrew5:
I don’t buy into the argument “Java is the new COBOL”.
Businesses HATE to hear “convert” and “rewrite”. My boss is about ready to fire anyone on the spot to suggests that these days, and he’s not alone.
You can’t have it both ways. The process of accreting ever more cruft on top of a soggy, muddy foundation of stuff is exactly what COBOL shops do. They were doing it the 1970’s when I started, and they’re still doing it. True fact: it was a large American insurance company CIO who blocked changes to COBOL ‘74 because it would impact some ‘68 code. It is this approach which makes java the new COBOL. I worked in that industry for the last eight years (no longer, phew), and there are insurance companies that refuse to upgrade from jdk 1.3. The American financial services industry (which is being exposed a tad these days) runs on 30 to 40 year old COBOL codebases; they don’t see the need to rewrite or convert to anything better. They are applying the same “thinking” process to their java code. The language is COBOL.
It has been argued that java (specifically OO as embodied in java) has been embraced by the corporate industries *just because* it supports the COBOL approach of accretion of ever more cruft. From my direct experience, when I read that for the first time, it was epiphany time; of course THAT’S why they view the database as copybooks rather then tables. And, just for the record, where else is java used anymore? Not including phones, which isn’t really java.
December 23rd, 2008 at 6:21 pm
+1 for ER Harold
I just got off a two-and-a-half year job using C# and am back in Java land. I was suprised and impressed with what Microsoft has been doing with the CLI (the equivalent of the JVM) and disappointed (but not suprised) with what Sun has (not) been doing. Microsoft has taken Python and ML (OCaml variant) and made them major languages aboard the CLI. And where there were problems implementing constructs that existed in these new languages they have (it appears) modified the CLI and then modified their flagship C# to also offer these constructs. So C# now offers closures, SQL and set operations on collections and something like macro’s, derived (it appears) from Python decorators. On the other hand no language that I know of has tackled the death of the WMP interface as multi-touch moves from phones onto desktops. And I don’t expect to see that level of innovation from either Microsoft, Sun or Google (current sponsor of Python).
December 28th, 2008 at 5:07 pm
[...] interesting discussion about the direction of java. Should we ditch backwards [...]
February 14th, 2009 at 7:44 pm
For what it’s worth, I am 23 years old, just stumbled on this blog, and have a bachelor’s degree in computer science. I hate programming however, I’m an IT guy but they didn’t have an IT degree program until my senior year.
Now, to Java, it’s one of the real programming languages I know to any extent. At my university, when I started, they taught freshman the basics of programming in C++, and most of the more advanced classes in VB.NET. My junior year they switched over from C++ to Java, so after having to learn Java, and discovering it was nicer than C++, I took operating systems in Java using Eclipse. And that’s it, except for one semester of Web development (XHTML/CSS, Javascript, ASP.NET), one semester of UNIX (including basic Perl and C). The database classes were in (T)SQL of course, with some VB.NET. So basically what I picked up was that as far as application development is concerned C is for UNIX (commandline only), VB.NET/C# for Windows (GUI), Java is for cross-platform (GUI as well), Perl seems to have no reason to exist.
Python? That’s just a snake.
February 25th, 2009 at 6:43 pm
@Angel Blue01
I am not sure what kind of school you go to.
But as far as I know, none of elite CS school teach OS in Java….or even offer courses on XHTML…
Computer Science is about algorithm, concurrency, graphics, ai. What you did was more like a Bachelor degree in Programming.
February 25th, 2009 at 6:46 pm
Yes. Python is just a snake.
But, it happens to be a snake favored by companies ,like Google.
February 26th, 2009 at 5:44 pm
I think, with GIL limitation Python will not live so longer in this multicore century. Java will gain its power again with multi cores. I hope wizard of Oz can help python…
March 15th, 2009 at 6:25 pm
This is article is particularly brain damaged. To claim Java is Dead is just insane. Sure it has its problems but the core fact is it is the most successful industrial strength lanaguage on the market. This is shown in adoption in even industry, front to back. People actually think about maintaining backward compatability seriioursly , unlike this author. Python is just another one of these Toy language , Ruby , Pearl , Php etc that find a niche in some areas but are no good for hard core distributed based computing and fall apart becauase they lack structure in many fields.
May 31st, 2009 at 6:34 pm
[...] for a long time and you are happy to be the one maintaining the legacy apps in their twilight. Elliotte Rusty Harold has it right in the comments when someone says that there are a lot of Java jobs still being [...]
July 29th, 2009 at 2:45 am
[...] Lessons for !perl 5 from !java: http://cafe.elharo.com/programming/java-is-dead-long-live-python/ [...]
August 8th, 2009 at 2:51 am
I must say, you’re quite wrong is your Java 5 assumption of breaking code – for one thing, you start by complaining it breaks downward compatibility, and then a few sentences later you complain that there even IS software complexity. I’ve compiled code from as far back as Java 1.1.8 without ANY issues. Seems rather backward compatible to me – not too sure what you’re referring to there.
Generics? Doesn’t break anything. If you don’t specify the type to use, it defaults to the top-most generic type anyway. Doesn’t break anything, but adds quite a lot of usefulness if you CHOOSE to use it. Not too sure what your issue there is.
As for closures? Who cares? Overrated. Anonymous classes work just fine, and are more predictable anyway. JavaStubs uses it to great effect without the need for the alpha-and-omega that is closures.
As for complaining about it’s size – okay, fair enough, but Sun had to do that to expand the basic offering of the core language. It’s called being feature rich.
Finally – dead? Sinking fast? Maybe you should actually evaluate the landscape before making absurd statements:
LangProp.com
TIOBE
Ohloh.net
Indeed.com
My sources show a language that’s in a very healthy state, usage-wise. Love it or hate it, there are still plenty of things you can do in Java that you simply cannot do in other languages.
October 12th, 2009 at 11:02 pm
Are people still using python?