Is Java the new C?

JavaLogoI started programming in Java a few years after it was released. I had been doing C++ for a number of years and just come off a C++ project which failed because they (who were a pretty good team of programmers) couldn’t scale it because of the two common killers: Threads and Memory Management. Near the end I was reading James Gosling’s original paper on Java which addresses the major problems of C++ and explaining how Java addressed them. I was obviously quickly sold! As a result I spent over a decade programming in Java and J(2)EE, in the beginning implementing (mostly web) projects way faster than the “C++ laggards” could.

Now, I’ve been doing Solution and SOA Architecture, occasionally whipping up a prototype in Java, or doing some Perl but quite often working with WSDL, XSD’s and just plain models. Recently though, I’ve been playing around with Clojure in my own time and am amazed at how much fun it is. It really reminds me about my early experiences with Java, but that would be the subject of another blog post…

Recently it has struck me just how many languages have versions or been constructed to run on the Java JVM. A list from Wikipedia shows:

Java LanguagesThat’s quite a few languages! What’s more, a number of them have plugins to an IDEs such as IntelliJ or more commonly eclipse. It struck me that these languages were effectively using Java and often IDE’s as a runtime / development platform, much like many high level languages used C.

Which begs the question – where is Java headed in the long-term? Yes, they’re adding Lamda’s in Java 8, but why would I want that when I can work with Clojure which has had this from the beginning and has a whole bunch of good extra stuff… Is it destined to become a “low level language and environment” upon which more sophisticated languages will be built?


  1. Kevin Peck

    We are probably due a replacement to Java but I don’t think there is an obvious front runner at this point. Just as Java helped us learn and move past a lot of the short comings of previous languages it has shown us a new set.

    Like you I was a day to day C programmer then C++ then Java. I still use Java today for desktop, server and mobile development. I also use python and Objective C. Both have their uses but I would not put either ahead of Java. I use python for small tool usage and Objective C for iOS development. Since people on the Windows side of things don’t see to care about Objective C I don’t see it moving out of that realm. Not my favorite language by a long shot but the best option for iOS. It does not solve the problems of Java.

  2. Privat Bruger

    Major banks in Northern Europe are leaving Java (on the client) behind because of security issues. I’ve programmed Java since AWT and it is excellent as a server platform. But it is also getting to be very complicated. To be honest, I liked Java better when Sun had the stewardship. I don’t trust Oracle. Not at all.

    I will be following Python in future to see where that’s going.
    My views may be tainted slightly to be biased against Java since my latest contract job. The slow machines, the slow infrastructure, the ridiculous software repository system and the build server were pathetic.

  3. Miloskov

    I like to stay close to the metal, So Yes We need Java 8 and lambdas.

    For people that like more abstractions should look into Scala is awesome.
    Clojure because is a dialect of Lisp is nice concepts but I cant stand the “((()))”.

    And there is plenty of options for the JVM. So yes you could say that Java is the new C of the JVM’s.

    But C still have it place, in the embedded and systems field.

    • S

      Speaking of the number of ({[]}), I didn’t like it until I tried it. Clojure source code doesn’t have so many of them as other Lisps. It can probably compete with most of the curly-braces languages if we count them per semantic unit. A pair per definition. A pair for call. A pair for a block. A pair for a data structure. (defn foo [x y] (println x) (println y)) ; gives 4 pairs. def foo(x:Any, y:Any) {println(x); println(y);} // gives same 4 pairs.

      Speaking of hand stress, both () and {} require Shift-ing, only [] are easy. There are few languages which rely on [] exclusively. Clojure drops comas (and that feels great!), and typing dashes is much easier than CamelCase or using_an_underscore (which require Shift-ing).

      Speaking of readability, Clojure uses different types of brackets, so syntactic elements stand out. And it’s auto-indented most of the time. Lower-case dashed-identifiers are eye-friendy too. That helps.

      Another aspect, which makes Lisp syntax great is that semantic code editing possible (like in Paredit). And that’s hard to match in non-Lisp languages.

  4. srgwthrn

    Java is unfortunately not going anywhere for me. Java is very nice, however when you want to use layered architecture and want to use frameworks like ORM, Html View Engine, Logging, Dependency Injection etc. java becomes a headache. It is the best language to use those methodologies but at the same time it is worst because it needs so much configuration that one person cannot remember all and has to search it up on the internet everytime a change is needed.

    Java Containers are so bad that I have theory about them. I think the container developers start developing one because they know all others are crappy, but they end creating a crappy one too. I mean come on Apache itself 3-4 containers alone! And I remember my Java years. Using a container never worked for the first time deploying a project! Not jboss, not glassfish and not other popular ones except Tomcat. Tomcat is not bad, except it is just a servlet container and not java ee application server.

    All the time I have lost with java I decided to go with C# for the application. I’m okay with paying it if it will let me focus on my application more and less on gibberish work and usability-lacking frameworks. I can make everything work with java, I did, but it takes time. I don’t want to spend time. If I did I would use C++. Java is not agile at all.

    At the end Java, as you have put the list, innovates really really fast but generally stucks at innovation point and doesn’t improve innovated libraries and tools much.

    Ah and, lambdas are amazing. Lambdas are the logic for methods of the methodology “composition over inheritance” suggested by Martin Fowler. You don’t need that, at the end you don’t need anything you can make your way with 1’s and 0′, it is possible but lambdas save time amazingly.

    • PhilH (@storm14k)

      Yes containers are hell. You end up spending time trying to make various containers work together and various frameworks work inside the container. There’s been somewhat of a movement to get away from it by using microframeworks with embedded web servers like Jetty but sometimes you still have to get inside the container. I’ve moved on to Go as a go to language. Its easy to work with like Python or Ruby but compiles to much faster native code.

  5. Pingback: Links & reads for 2013 Week 17 | Martin's Weekly Curations

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s