If Java Is Dying, It Sure Looks Awfully Healthy 577
Hugh Pickens DOT Com writes "Andrew Binstock writes at Dr. Dobb's that a recurring prejudice in the forums where the cool kids hang out is against Java, often described as verbose and fading in popularity but Binstock sees little supporting evidence of Java being in some kind of long-term decline. While it is true that Java certainly can be verbose, several scripting languages have sprung up which are purpose-designed to spare developers from long syntactical passages to communicate a simple action, including NetRexx, Groovy, and Scala. As far as Java's popularity goes, normally, when technologies start their ultimate decline, tradeshows are the first to reflect the disintegrating community. But the recent JavaOne show was clearly larger and better attended than it has been in either of the last two years and vendors on the exhibiting floor were unanimous in saying that traffic, leads, and inquiries were up significantly over last year. Technically, the language continues to advance says Binstock. Java 8, expected in March, will add closures (that is, lambda expressions) that will reduce code, diminish the need for anonymous inner classes, and facilitate functional-like coding. Greater modularity which will be complete in Java 9 (due in 2016) will help efficient management of artifacts, as will several enhancements that simplify syntax in that release. 'When you add in the Android ecosystem, whose native development language is Java, it becomes very difficult to see how a language so widely used in so many areas — server, Web, desktop, mobile devices — is in some kind of decline,' concludes Binstock. 'What I'm seeing is a language that is under constant refinement and development, with a large and very active community, which enjoys a platform that is widely used for new languages. None of this looks to me like a language in decline.'"
Scripting / PowerShell (Score:2, Interesting)
Re:Wake me up... (Score:4, Interesting)
You should tell John Carmack about your theory, I bet he'd be really interested:
https://twitter.com/ID_AA_Carmack/status/85734195644727297 [twitter.com]
Re:Scala is a scripting language? (Score:3, Interesting)
Scala is basically C++ on the JVM.
It's what Java would be if the stewards of Java weren't so conservative (or lazy) about new features.
The powerful features of Scala tend to make code unreadable months down the road in my experience. :(
shipping java scientific software for 15 years (Score:5, Interesting)
Java allows seamless GUI front ends and web-service control.
The new features in Java-8 are very interesting.
Google Chrome is killing java (Score:2, Interesting)
The thing about Java is that despite flaws it was cross platform. that is it was, up until chrome. Right now you can't run the latest java in chrome. (chrome is 32 bit, and java 1.7 is 64 only.) And then there's chromebook which also has no java. And then there's Dalvik. So google seems to be pulling a microsoft on Java. I've switched away from using chrome to boycott google.
who it is popular with (Score:4, Interesting)
Native code produces a security exception (Score:4, Interesting)
But if you really need them, perhaps that should be a signal that a lower-level language is more appropriate for that particular component in the system.
Provided that the platform curator even allows the use of lower-level languages. For example, Java applets have to be written in Java, and Xbox Live Indie Games and Windows Phone 7 applications have to be written in C#.* An applet that attempts to use JNI or an XNA game for Xbox 360 or application for Windows Phone 7 that attempts to use P/Invoke will die with a security exception.
* Technically, XBLIG and WP7 allow the subset of verifiably type-safe CIL accepted by the .NET Compact Framework. But in practice, languages other than C# either aren't verifiably type-safe (such as standard C++ in C++/CLI) or require library facilities not present in the .NET Compact Framework (such as any DLR language).
Re:shipping java scientific software for 15 years (Score:4, Interesting)
Re:Wake me up... (Score:4, Interesting)
Wake me up when java supports unsigned integers. Until then it's not a real language.
While unsigned numbers are great for a few things, mixing them with signed numbers is a real pain. Just consider all the C functions, which take in unsigned but return signed, and casting galore that follows. Of course you can just disable relevant warnings entirely and blindly hope implicit casts anywhere will never overflow, but that is kind of sloppy, and just asking for someone to find a way to use it for an exploit. Which incidentally is what most C code does.
Re:Android, Objective-C and Tiobe Index (Score:5, Interesting)
No, I've seen pretty much that dynamic happen at Google where we use a lot of C++ and Java.
There are some places Java just can't follow C++ ... the Google core web search serving system is mostly C++ because it involves decoding extremely compact data structures at insanely high speeds, to the extent that the verymost inner code has branch prediction hints in it. Java can't do that nor will it ever be extended to do so. Lots of servers at Google are written in C++ for the same reason. I don't believe it's only 5% faster, the rule of thumb I see is you lose about 2x the performance by using Java when all the costs are taken into account (like constantly re-compiling the same code over and over on the live servers, the GC costs, etc).
Despite that, lots more code is written in Java, because the cost of using C++ is so high. Sure, when the sailing is smooth there isn't a huge difference between them as long as your libraries and support infrastructure are good, but the moment someone slips up and accidentally double frees memory on an error path you've got a problem that can take an entire team a week or more to track down. I've seen it and partaken in such bug hunts. There's nothing quite like trying to find memory corruptions that only show up in the production environment once a day, when you have thousands of servers.
Basically any programmer can screw up that way. Java strikes a reasonable balance between safety and performance, which makes sense even when you are a company like Twitter or Google.