Oracle has made some decisions about Java: in order to release JDK 7 in the middle of next year, they have decided to change priorities and specifically, postpone three features: Jigsaw, Lambda and Coin.
From the linked article: “Jigsaw is an effort to make Java more modular, while Project Lambda aims to bring closures to Java, and Project Coin is an effort to make small changes to Java’s behavior and syntax.”
Although none of these, with the exception of closures, really speak to me (and Java is the language I earn a living with…), my personal feeling is summed up in the first question that came to my mind: why postpone features so that JDK 7 can get out of the pipes fast (i.e. 2011) and still have them in JDK 8 which is planned to be released in 2012?
Maybe that one of the reasons is to not lose too much momentum, but I still don’t understand the logic behind the seemingly pressing need to release JDK 7. I don’t deny that a 2D and 3D graphics engine would be useful, or that JavaFX bridging “the gap between Java applications and the browser’s DOM, where HTML 5 and JavaScript exist” isn’t important. I’m just puzzled by the timeline. Less than 18 months between two official JDK releases seems kind of hasty, even in the light of previous release dates. Take a look at JDK 6 and you’ll wonder how “small language changes” (see the Oracle webpage linked below) could be unwieldy enough to not be baked in the next release.
In my eyes, Java is just fine as it is since it has always served any purposes I’ve ever had in my professional projects. I’ve always felt the language was overhyped for a long time, now it’s threatened by the likes of Ruby, Lisp or Smalltalk. I feel like the way Java is either glorified or decried isn’t how a language should be treated. I guess you can’t fight the tides of progress. But keeping the final product consistent with the feature set until release time looks preferable to removing features, including the drastic change and power Lambda will bring into Java. Especially when the latest release is three months short of being four years old.
The ironic thing is that the “modularization” and “developer productivity” sections still list projects Jigsaw and Coin amongst the key features on Oracle’s own website.
There are some super amazing performance improvements added to Java 7 (Tiered Compilation, Escape Analysis, Optimisations to remove bound checks, etc). Just the really nice performance boost is IMO worth releasing a new version for, why hold up cool things like this for another 2 years?
And if you want to play with closures, there is always Groovy.
Or Scala if you also want the performance of Java…
Right, that too! Wasn’t there some quote from the creator of Groovy that went something like “if I knew [they] were developing Scala I wouldn’t have bothered with Groovy…”?
Giving Java developers what they want goes against tradition. They need to take their time and let the competition gain a bigger lead.
This way by the time these cool features come out Qt will be well established as the preferred method of cross-platform development.
I’ve tried learning Java, but the lack of properties (C# does this so awesomely), lack of lambdas, and to be frank, a lack of LINQ, makes it so I just can’t stand it as a language.
C# is more like a staticly typed Python. Java is like C++ with a garbage collector.
I have to agree with this guy: http://day-to-day-stuff.blogspot.com/2007/12/demise-of-java-long-li…
Java is dieing, the JVM is still solid, but give it a few years, and Clojure, JRuby, Jython, and others will kill it off, IMO.
On the desktop it died a while ago; Apple killed off their Cocoa bindings for Java – when you consider these:
1) Objective-C 2.0 has garbage collection, and in the future that’ll arrive on iOS.
2) Silverlight and .NET are the platform of choice when it comes to WP7 development in the future.
3) Multilanguage nature of Android.
The ‘need’ (if there ever was one) to write in Java has pretty much died. It is going to survive but I’d say as more of a niche product in the enterprise with the largest customer being Oracle itself for their own projects.
It’s still faster and more efficient for large website engines than many web development platforms. I’m not particularly fond of it, but we’ve been using it for 8 years now. A recent, internal project I’ve been assigned to uses RoR/Hobo. While I enjoy developing with Ruby/Rails, it is slow in comparison to a Java-based site (even using JRuby) because of the chatty data management model it uses.
Trade offs. But Java hasn’t quite died yet.
But in terms of complexity how does RoR when compared to Java? The argument might hold that it is cheaper to get gruntier hardware than having to deal with the complexity of Java – that the cost of developer time is more expensive than just having a more heavy duty server. Thus the big argument is between efficiency versus throwing a bigger server at it – that something might be more efficient but if it requires specialised skills to get it to function properly then any gains are negated by the additional development costs.
True enough. It has been an ongoing debate. I think the appearance of RoR in my current assignment was brought about because of that argument, and the argument that we save money in man hours developing with Ruby/Rails.
(Altho’ I think the learning curve of Hobo has negated that, at least for this project).
RoR is undoubtedly a hell of a lot better and quicker to develop with, but the pain with it is definitely deployment. It’s got better, but not as easy as with Java and other platforms.
Apple only introduced the Cocoa bindings for Java, because in the begining they were unsure the developer community would pick up Objective-C. So they were offering both languages to see which would gain momentum.
I would agree that you will hardly find any software package at the local shop developed with Java.
But on the corporate world Java is pretty much alive in the desktop.
Regarding your points
1) Outside MacOS no one cares about Objective-C
2) .Net is only a choice when targeting Microsoft systems and the sucess of the WP 7 is still uncertain
3) Not sure what multilanguage you mean. C and C++ besides Java? Anyway android is only used in mobiles.
Java is pretty much alive in the enterprise. There is no language out there good enough to replace it.
.Net is only an option if you are deploying Windows only solutions. Don’t even talk about Mono to .Net guys, it is always seen as a kind of toy.
C++ has already lost its position to applications that require lots of performance out of the systems, and does not have the tool support that Java and .Net enjoy.
The only scalable, performance and multiplatform language currently available in the enterprise world is Java and it won’t change in the near future.
Sure the community is not enjoying all these delays, but they aren’t nothing, compared to the time C++ developers will need to wait for a 100% C++0x fully compliant compiler, across multiple platforms.
We are using JRuby for a project now. It is significantly quicker than standard Ruby. I’ve been curious about Clojure. I use Groovy at home for some small projects (ex. I wrote something to generate math programs for my kids to practice on).
It seems like they should, perhaps, spend as much time as possible enhancing the compiler/byte-code intepreter.
Well as you can see here: http://en.wikipedia.org/wiki/C_Sharp_(programming_language). Python isn’t among the list of languages that influenced C#.
That might have something todo with the fact that Microsoft started working on .Net AFTER the lawsuit from Sun. This lawsuit ended in Microsoft not being allowed to use Java anymore (ie. stop trying to hijack Java with its J++ ‘implementation’). When all the dust settled Microsoft paid Sun something like 1.6 billion Dollar iirc for all infrigement, non compliance, etc.
.Net 1.0 was basically a Java clone. It was only AFTER 1.0 that Microsoft came with innovation.
So how anyone can say .Net is more like language X then Java is beyond me.
He didn’t say that C# 1.0 was more like Python than Java 1.6, he was saying that more recent versions of C# (like 4.0) are a lot more like Python than Java is.
And it’s true.
C# 4.0 has a lot of dynamic features that really help in writing a lot of code that Java just doesn’t have (but is slowly copying from C# now that Java’s dominance is being threatened).
As far as I can see the poster says nothing about any version.
For the point I’m trying to get across version numbers are irrelevant; What I’m saying is that since .Net was largely based on Java it will always be closer to Java then any other language since Microsoft has to maintain backward compatibility, it can’t change that.
I’m not talking about a higher level features which got added later like closures. Which on the surface make the language/platform appear like language X or Y. I’m talking about the platform as a whole; VM, garbage collection, etc.
What are these dynamic features that c# 4 has?
What is rarely mentioned is that Java looked and ran like garbage in Windows.
Developers hated how Java looked in Windows thanks to the VM and non-native controls.
Java was really sunk on the desktop thanks to Sun’s arrogance. I remember seeing a thread where a developer complained that clients did not like how Java fonts looked in Windows and a Sun rep told him to suggest an OS change. Java would have died on the desktop even if .net was never created. Developers hated how Sun ignored their needs, some alternative framework would have been created out of necessity.
And developers, and users, still hate how non-native controls look on any platform. Java as a desktop app language has always been hindered by the “Java is ugly” problem, meaning non-native controls look and act out of place. The primary improvement of .net over Java on Windows is that .net programs *look* and *act* native, which means they are native.
I admire that Sun wanted to strictly enforce portability, and thus required No External Dependencies Whatsoever, but this is a case where they took this ideal to a detrimental extreme. You can be portable and still adapt to the local system! As long as the code will run on both systems it really doesn’t matter that it takes advantage of native integration on one and not another, or due to that integration looks and acts a little differently. Take firefox as an example: it’s cross-platform *and* tries to look native, and largely succeeds. It may take a lot of platform specific code but the results are worth it (and Java could have chucked that code in a library where most developers would never have to care).
No, I’m not saying it’s based on Python. But in it’s current incarnation (.Net 4). C# supports lambdas, dynamic variables, and even includes a SQL like DSL (LINQ). C# is an imperative language with declarative features. In that sense it is like Python. For instance, C#, Python and Ruby all allow you to do something like this:
var array1 = array1.Filter(x => x.Size > 20);
Doing that in Java/C++ would take about 5 lines of code to create a temporary array, filter the data, and then output the results, and it still wouldn’t be clear what was happening. With C# the result is clean, elegant and only 1 line of code.
With the added benefit of running only on Windows.
You need to update your C++ knowledge as well.
auto array1 = array1.Filter([] (auto x){ return x.Size > 20});
Nah….my version would work on both Linux and Windows, (yes I use Mono regularly).
This is some unreadable code right there (it does make me appreciate the extra “wordiness” of Objective-C):P.
Jokes aside, Java needs a good, understandable, clean, and easy to approach way of building rich and interactive GUI’s. There is JavaFX on the horizon, but there is a lot of work ahead to match what .NET applications with or without Silverlight can do with less work put in from the UI designers.
Designing nice GUI’s is a pain in Java (it does feel like an afterthought…), and is in Android too (compared to Interface Builder driven GUI’s on the Mac/iPhone)… C++ has received some very powerful GUI toolkits like Qt, .NET has received a lot of attention from MS as far as rich User Interfaces are concerned, Objective-C + Cocoa have some very powerful UI oriented features and an awesome tool like IB to help people design their UI’s in, etc…
If Oracle does not manage to move Google away from Java in Android, there might be a chance for rich GUI’s to push for some change in the way you do GUI’s on such systems (although sometimes Google feels a lot less user and developer oriented than Microsoft or Apple…).
The problem with you is that you want Java to be C#. C# has its evolution by that way and we should not expect that Java is going to evolve by the same way:
* Properties: They are just an elegant way of write GetX() and SetX().
* Lambdas: They were part of the JDK 7 release plan, so, you will see them some day… Anyway, you have anonymous classes that do the work.
* LINQ: Beautiful C# extension but could be implemented as a set of libraries.
Java is going to be the “C” of such languages. Nobody is going to rewrite the whole JDK in such languages, so, Java will always be the language where the JDK is going to grow.
Edited 2010-09-25 14:22 UTC
I use Java, almost exclusively, for my programming needs. I tried Ruby for about a year. It was must faster to develop code in Ruby, but it was a pain to debug and maintain it. This has been an issue with almost all dynamic languages. Perl offers to check variable declaration for you, which puts it a step above most dynamic languages, but OOPS in Perl is an afterthought, which makes larger projects get ugly very quickly. Moreover, when Java is used in an IDE, it is a delight to work with, which has me coming back to it all the time.
C# is the only serious contender to Java, in my opinion. With the Mono projects, C# is not platform specific anymore. I’ve often considered switching to C#, especially to take advantage of its association with .NET, but never got around. Mostly because a lot of the dependencies I use are written in Java, and partly because I’m quite familiar with Java. So I don’t think I’m abandoning it soon. But, at the end of the day, it needs to evolve. Closures would definitely provide a major boost to my code cleanliness. Too bad that it won’t show up anytime soon.
There are some powerful IDEs for Java… And of course J2EE has everything you could imagine in it including the kitchen sink… not to mention a vast community of developers that have been creating libraries and utilities for Java over the past decade or so.
Oh, and don’t forget to try Perl 6.0 when it is finally released.
If you are only targeting Windows platforms, then using .Net makes lots of sense.
But if you plan to go multi-platform and are betting on Mono for that, then good luck.
Where are all the Unix, AS/400 tools for application server and clustering support that .Net(in Windows) and Java offer, in the Mono world?
And lets not forget that Mono only supports the .Net APIs partially.
http://www.mono-project.com/Compatibility
I don’t like this stupid trend of adding language features… It does more harm than good.
Java 1.4 was perfect: simple, elegant, legible. It was a kind of C for OOP.
Then SUN ruined it with generics and annotations. It’s impossible to read the code, It sucks. What a shame.
Now, Java is just another abortion like C++. No, It’s better than C++… but even Brainfuck is better than C++.
Hey, what about foreach (for stuff: listofstuff)? That alone was worth the upgrade
You can already do foreach in Java..
EDIT: Whoops misread your comment. Yes being able to do foreach in java makes it pretty simple. Also I like generics.
Edited 2010-09-25 11:12 UTC
Too bad Java’s generics suck so bad. They should have done them the same way that Microsoft did with C#.
At implementation level, maybe you are right; the generics implementation in Java is just syntactic sugar… but for the application developer, they provide a very nice abstraction level and type safety.
They were done that way to keep backwards compatibility.
How would you feel, if you had to go back and rewrite your applications in order to be able to use a new compiler version?
Can you explain that?
As long as they put new generic classes in new namespaces, and leave the old non-generic classes as is, you would preserve backwards compatibility, no?
That is something that i never understood. I like generics, but i do think that in Java it is implemented as a hack. Not really as part of the language, but more something like a preprocessor for the compiler.
Generics was implemented for marketing purposes (even Gosling was against it). In 2005, you have to have “generics” in the feature list because It sounded cool and trendy (and C# had it).
Now, It’s the same story with Lambda, Closures and so on.
Google uses java 1.4 for Android for a reason: They’re smart. Simplicity and coherence are better than any other feature.
IMHO If you want syntactic-sugar then use an scripting language like Groovy, JRuby or a DSL!!!
Generics, as implemented in C#, are a powerful language feature which reduces the number of lines of code needed, improves type safety, increases code speed and decreases memory usage.
Of course in Java, generics is implemented as syntactic sugar, and only manages to reduce lines of code needed but doesn’t actually do anything beside that. They should have made a clean brake.
What Gosling thinks is IMHO irrelevant. He created a language without unsigned datatypes, enums or generics although programmers requested them. Also the whole strict FP thing is a mess. That you characterize Java 1.4 as C of Object Oriented Programming is baffling to me. C is elegant in its simplicity and never tries to dumb anything down, Java does exactly the opposite.
I don’t know about you but I very much like generics in c#, they make code much more readable. I don’t know how java does it, but if they do make code unreadable then they’re doing it wrong..
Java is everywhere in the corporate world. It’s the new Cobol. Even when everyone else stops using it there will be billions of lines of code in use that will need to be maintained and billions more that will be created within existing frameworks.
I know someone who works at a megacorp and they invested in Java during the hype years and now they are in too deep to get out.
Even though it is dead on the desktop there are still plenty of Java jobs thanks to enterprise.
This might be about the Java platform more than the language though, what is the point of being portable if you cannot dare to use it for desktop apps. JavaFX is #FAIL. Scripting languages for JVM can in fact make it easier for app development, but not as long as Swing is easier to deal with
In my line of work, the servers are BIG and handle millions of transactions worth billions of dollar, each day.
Those servers are always running Unix/Linux/OpenVMS. They can not run Windows, because Windows becomes unstable at high loads with clustered solutions.
On Unix/Linux/OpenVMS servers we find good implementations of Java. There are no good implementations of C# nor .NET. Mono is not an option, when you handle billions of dollars each day – you need full 24/7 support from MS.
Therefore all BIG servers are running Java/C/C++. On the desktops who runs Windows, we see C#.
Ergo, Java for servers. C# for desktop. If there where good implementation full support of C# on Enterprise OSes, such as Unixes the servers would also use C#. But as of now, the servers only use Java/C/C++.
Funny how myspace uses asp.net just fine:
http://weblogs.asp.net/scottgu/archive/2006/03/25/Handling-1.5-Bill…
Java on servers is a productivity sink compared to asp.net. Ruby in steel is a better alternative.
You really can’t compare myspace with software that deals with financial transactions. It’s like saying “…look, my Datsus can go around the race track so that puts it in the same class as a Ferarri…”.
I actually am starting to believe in Java again after Oracle is showing a roadmap for it, investing heavily while keeping it open source.
Java was a dead end while Sun was in charge, but if Oracle can clean it up, and do it fast without mistakes it might survive.
At the moment only the .NET ecosystem is anywhere near the Java ecosystem for enterprise development (and I would argue that at this moment .NET is even better for most jobs – although not for everything). If history have proven anything regarding technology it is that people want choice and diversity. So until there is any other serious alternative to .NET, Java will stick around – when when a third option arrise, Java will go down first unless Oracle invest properly in it.
Oracles only mistake so far was to sue Google over Android, attempting to kill off the only GUI-application development kit for Java that does not suck ass. What Oracle forgot is that Android developers ultimately are Java developers.
So what I am trying to say is; fuck you Oracle… now go clean up your act and fix Java with no more stupid mistakes. I still believe you can do it and regain the trust in the Java platform.
Given that the next release of JavaFX is planned for Q3 of 2011 I wouldn’t have high expectations of a quick turnaround.
http://adtmag.com/articles/2010/09/24/javaone-2010-roundup.aspx
Java SE will probably stagnate as they focus on JavaFX and JME.
….. the largest of enterprises, running huge apps that handle millions of transactions a day, on multiple platforms (particularly Unix/Linux).
For that arena, Java/JEE is actually quite good. Java’s relative conservative approach to adding new features here is actually helpful, because this class of application has to be easily maintained and extended, and simplicity of features helps. Also, the JEE APIs are built for the largest of apps/enterprises in mind.
But Java pretty much sucks for everything else – desktop, mobile, small to medium web apps, etc. For those, it’s too bulky, complex, and ugly.
Also, from a vocational perspective, Java has a very high barrier to entry. I’m an experienced developer in multiple languages. But my work experience is not specific enough to Java (to be a top notch candidate to get top dollar, which my experience actually deserves), and in particular the bazillion different frameworks, IDE’s, build tools, APIs, App servers, version control systems, and on and on.
Heck, it can be difficult even for experience Java developers to meet someone’s specific laundry list –
“What, you have 5 years with JSF/EJB/Jboss/Ant/Eclipse? Sorry, we need 8 years experience with Spring MVC/ Spring Container/Tomcat/Hibernate/Maven”.
And say you want to move into Java or C#, after having done C++ or Cobol or something else for a number of years.
With C#, you need a book on C#/.Net/Visual Studio (one book) and maybe something on WinForms and/or ASP.Net (maybe another book or two), and optionally something on Entity Framework or ASP.Net MVC, or even WPF (again, optional). That’s really just two books, maybe three that are needed.
With Java, you’ll need books on the following:
Java SE
Java EE – JSP/Servlets/EJB
Spring
Hibernate
Ant and/or Maven
Eclipse and/or Netbeans and/or Intellij
JUnit
JSF and/or Struts and/or Wicket and/or Grails and/or SpringMVC and/or Tapestry and/or … well the list goes on
Tomcat and/or JBoss and/or WebSphere and/or WebLogic
Swing and/or SWT
… you’ll need a bare minimum of 8 books (JSE,JEE,Web framework,Spring,build tool, unit testing, IDE, App server), and arguably more, because everyone has a specific laundry list.
As an open source fan, I think all that choice and strong ecosystem are great. But it adds huge complexity to one’s career path, not to mention developing and deploying.
But for me, C# looks really attractive – I have lots of experience in VS, C++, and C#, and some in ASP.Net. It’s a simpler career path, and C# devs are comparable to Java devs in terms of compensation. Plus, C# is just a much nicer language than Java. It’s as if Anders Heijlsberg learned from Sun’s mistakes, and did it right.
I write fairly small apps at work, and for one reason or another they have to run on both Linux and Windows, ideally without installation. Java web start is convenient for distribution, the windows PLaF looks perfectly decent, and everything generally works fine and is comfortable enough to write and use. Nothing exciting, but it’s genuinely useful for me, and I don’t see any sensible replacements.
That said, I would rather be writing Python for quick stuff and C for intense things. Oh well, java works. (I guess I should check the status of Jython again. Wonder if the netbeans integration is any good?)