January 16, 2008I'm not tired of Java yetRick Hightower posted an interesting follow-up to Zed's rant against Ruby on Rails. There are a lot of insightful comments in this discussion, and one in particular caught my attention: People are tired of dealing with Java's many idiosyncrasiesI've been reading this a lot these past years but I've yet to see any evidence of it. Come to think of it, this statement is mostly coming from bloggers, but...
Sure, there are things in the language that bother me, but it's true for any language, and as a whole, I always enjoy going back to my favorite Java IDE and leverage its superb features to write code that I find is elegant and that achieves a goal. Whenever I use a non-Java language, I always have this nagging feeling in the back of my head that something is going to hold this piece of code from ever becoming mainstream or used by a lot of people. It can be because the language is slow, or that it needs an interpreter. Or that it will be hard to deploy my program on a user's machine. Or that this language was created before OO became mainstream and its support for new paradigms feels retrofitted and creaky. Or that its support for floating point is very poor. Or that its thread API is primitive and the author of the language keeps saying that it's no big deal and that you can do without that. Or maybe it doesn't have any Web framework that supports internationalization, a clean MVC model or out-of-the-box testing. Or I want to write a client application that leverages its host operating system but all that it offers is an ugly-looking user interface and leaking metaphors. None of these defects take away the pleasure I derive from sometimes straying off the beaten path and writing code in an exotic language, but it does set my mind into a mode that tells me that this piece of code will never be promoted past the "toy" status. Toy listings are great for sniped blog entries, but a mainstream programming language they do not make. Whatever your favorite language is, be it Scala, Ruby, Python or Groovy, I'm with you. I really am. I understand the warm glow you feel when you write code in your language because I feel it too. But what you need to understand is that there is very little chance that your language will displace Java in any way in at least the next five years to come. But please, keep posting cute code snippets that show how great your language is, because I love to be challenged in the way I think and indirectly, Java benefits from all these great ideas that keep being posted in the blogosphere. Comments
Well spoken! Fully on your side here. Good post. I have to say I'm sick and tired of reading endless posts about how Java is dieing. It isn't the be all and end all but within its problem domain it is an absolute joy to use and I've enjoyed my eight years (so far) with it more than any other language I've worked with – and I've worked with quite a few. It would be surprising if something didn't eventually come and take Java's place but that something is not here yet as far as I can see. Posted by: at January 16, 2008 10:29 AMIt's been a long time since I programmed in Java but nowadays it seems to be always playing catch-up as far as language features are concerned. See in how short a time .NET/C# has evolved. Attributes support from 1.0 Generics built into the run time itself in 2.0 All the cool lambda stuff, extension methods, linq etc in 3.0 All these in such a short span of time!!! At some point Java has to evolve and integrate new language feature quickly or soon you'd be working with an less expressive antiquated language. Companies can't move away since they already have such a huge investment in Java. I do not know if C# has been delegated to the toy status yet :-) Posted by: Ajai at January 16, 2008 11:01 AMUgghh...The comments may be interesting but the actual blog post is a bunch of sh-ite. If rails is a ghetto, java is a third world country getting a new infusion of american "democracy". Maybe not that bad, but there are certainly a higher proportion of bozos. Posted by: Jesse Kuhnert at January 16, 2008 11:13 AMNow that's a pretty good post, no matter what Jesse is saying :). I agree that Java is not dead. Sometimes it's not about displacing, it's just about complementing. For example, Groovy complements Java very well. You could use it selectively only in certain areas (i.e. writing DSLs). Furthermore the tool support for Groovy is very good so you don't notice whether you're developing a class in Groovy or in Java. Well, at least that's how it is with IntelliJ and the JetGroovy plugin. Posted by: Manuel Palacio at January 16, 2008 01:38 PMGrrr, only 5 years? Posted by: at January 16, 2008 02:03 PMAbsolutely right, when you're talking about Ruby, Python or Groovy. Toys. But Scala...? Note that none of those sources of "nagging feelings" are relevant, because most of them are concerns about moving away from the JVM, rather than the Java language. However, Scala compiles down to JVM bytecode, just like Java. Therefore the runtime performance and deployment characteristics are exactly the same as for Java. Likewise, support for floating point is the same as Java... threading is the same or better (check out the Actors API). Web frameworks? All the ones available to you as a Java developer, plus liftweb which was designed specifically for Scala. GUI? Swing or SWT, just like Java. Nobody sensible is claiming that the Java Platform is dead. Far from it. But Java-The-Language does, I believe, have a chance of being displaced as a primary language for new development for the JVM. Incidentally, say this as another Java developer with close to 10 years experience. Posted by: Neil Bartlett at January 16, 2008 03:29 PM"I've been reading this a lot these past years but I've yet to see any evidence of it." Ok, let me provide you some evidence! I hate type erasure! It makes my life miserable on a regular basis. I program a good bit in ActionScript and Ruby, as well as Java. I often find myself missing closures in Java. Not just like, "oh this would be nice here" but "grr this is going to force me to write an interface, an extra abstract class, and all together an extra 200 lines of code because I can't use a closure!" I write a lot of infrastructure code that is used by other people to make their lives easier. So maybe that exposes me to things like this more often, but whatever. There's your evidence Cedric! Posted by: Michael at January 16, 2008 03:49 PMGood post. Well said. And you didn't touch on the enterprise aspects, where the Java-killer languages are far behind. Posted by: Andrew at January 16, 2008 05:11 PMThat puts it. I think Java is an all-purpose language. We had a discussion some 6 month ago about Ruby on Rails and the ease you can write WebApps (such as Blogs etc.) with it. One of us stated a sentence I cannot forget since then: "Such frameworks and languages (be it Ruby, RoR, PHP, ...) are there to make easy things really easy and really complex things impossible." My bet is on Java, be it old, verbose, kincky or something else, it gets the work done. Posted by: Georgi at January 17, 2008 10:58 AMYour comments about other languages might have been opposed to Java ten years ago. And they did, remember when you were trying to convience people that Java had a brillant future, they told you the same. The only difference was that C++ was the way to go at that time. Posted by: Casa at January 17, 2008 12:08 PMCasa.... All true. Except Sun spent 5 years whipping java into shape and making it a compleate platform. MS did the same with C#. Whos investing that kind of eng $$ in these new languages? Ruby, Python, etc, etc... all have some really cool features. But they are missing the complete platform and/or need serious work on performance. Java is slowly (which is good) growing the best of those features. What are people going to complain about when java 8 has closures and auto-getters/setters? Other than apple being a year behind with their release.. I'd bet actual money that the java language and platform is going to be a significant presense for a very, very long time. Posted by: dave at January 17, 2008 03:06 PMI agree. Java will be around long after all these so-called "dynamic languages" are long forgotten. This "expressive language" trend is perpetrated by young programmers with no experience, but it was started by 80's holdovers who learned programming before OOP and IDEs. With a tool like IDEA or Eclipse I really don't care how verbose Java is. In fact I like it verbose, because it makes code really easy to read and maintain. And don't even mention Scala. The syntax is unusable (who the hell puts the type after the variable name?) and its only a toy language designed by academics. Posted by: Ahmed Hassan at January 17, 2008 10:55 PMPython is a toy?? The main language of Google. Used to build more than 200kloc aviation systems. Please divide your feelings and the reality. Posted by: Artur S. at January 18, 2008 12:54 AMSince I have learned how to use closures I would feel tremendously restricted in my programming expression if I had to use a language missing them. Java is retarded beside most of other VM languages out here. It would be valuable to fix it. Posted by: batiste at January 18, 2008 01:03 AM"The syntax is unusable (who the hell puts the type after the variable name?)" ZOMG! You are right. It is absolutely ridiculous to put the type after the name! You would need to be some kind of superhuman to get used to it. Posted by: Asd at January 18, 2008 02:24 AM@Ajai Come to think of it, this statement is mostly coming from bloggers, but... * They don't speak for all Java developers (actually, they represent a very tiny fraction of them). -- In a blog posting defending Java, the irony in these statements is amusing :) Posted by: Brian at January 18, 2008 09:40 AM@arthur There are three official languages at google, c/c++, java and python. Python is mainly used for deployment scripts plus for example code.google.com forums, while java is used in many server side applications developped after the main search site, such as gmail, google base, etc I personally agree that python'snot a toy but google is certainly not an example of java dying. Posted by: Christian at January 19, 2008 03:36 AMI've been programming in 2GL (directly entering codes corresponding to CPU instructions), then I moved to 3GL (assembly, then C, then C++ then Java, since the last century already). When people tell me that "Java is dying" I answer them: "yes, and it's impossible for you today to make a money transfer without having Java involved in the process at one point or another, you've probably got a JVM in your pocket [> 95% of cellphones run Java], and you'll soon have Java in your living room, because Java is *part* of the Bluray specs. So if you think Java is dying you better wake up and open your eyes to the Java world, because the world won't change to accomodate your views". I don't know how's the state of remote debugging and remote profiling in the toyish languages. Oh, and I'd sure miss the code coverage reports directly integrated in my IDE. :) But yup, Java is dying. I used to program in Cobol, and then I learned Natural Adabas, and then I learned Turbo Pascal. And then I learned C, C++ and VB, roughly all at the same time, strangely enough. And then I learned Java, and then I learned C#. And now I'm learning Groovy. I still program in Java, C# and Groovy. Thing is, all these points about language X dying are benign. So what? If your language is on the up and 'mine' (not that I own any language) is on the 'down', so what? I'll learn whatever I need to to get the job done. This language X stuff is like saying my dad can beat up your dad. Just dumb. To the post about C# having evolved so much quicker than Java. Totally agree. Closures. Absolutely. Why aren't they in Java already?! But, I do feel you're being a little disingenuous when you consider that MS rode the back of all the lessons learned by Sun. At one point you could almost do a Search and Replace on a Java program to generate a C# program, such was the similarity between the API's. I certainly have never considered MS an innovator. That said, Sun, get your butt into gear! Java needs your attention. Happy blogging one and all! :) Posted by: Darryl Pentz at January 23, 2008 04:34 AMM$??? While I'm still not sure after how I feel about Microsoft...I think I'm still bitter after all the cumulative hours of life lost working with technologies like VB or SQL Server or ASP.NET...I did not work with these technologies very long but at any point I came across them, it was more than long enough. M$??? While I'm still not sure after how I feel about Microsoft...I think I'm still bitter after all the cumulative hours of life lost working with technologies like VB or SQL Server or ASP.NET...I did not work with these technologies very long but at any point I came across them, it was more than long enough. Post a comment
|