Live data from Hacker News

If Java Is Dying, It Sure Looks Awfully Healthy

drdobbs.com

101–110 of 327 posts

Re: If Java Is Dying, It Sure Looks Awfully Healthy

#101
Stopped reading the article when he referred to Scala as a scripting language. Clearly the author has no idea what he is talking about. Sure, you can use Scala for scripting (I never do) but its main value is in software design, whereas scripting usually is not about design, but about a quick solution.

Re: If Java Is Dying, It Sure Looks Awfully Healthy

#102
post #79

Earlier quoted context omitted.

I hope I get no down votes from the following comment. This is not true, C# can be thought as superior to Java, only if you intend to be completely immersed in the Microsoft stack and this assertion is still debatable. I personally like Java more than C# just because Java is truly platform independent and fully open source. When you have two similar software products the one which is open source will always be a bett…

To be fair, Mono exists, and contains a free implementation of C#.

True, but you can't spruik that and then tell us in the next breath about the wonderful developer tools and Intellisense, etc., because most of that doesn't exist outside Windows. With Java it's not just the JVM that is cross platform - the whole developer ecosystem and culture is from the ground up. Every IDE, every compiler, every tool, all runs on every platform. It has it's holes, but largely Java actually achieves this, which when you need it, is a huge win.

Re: If Java Is Dying, It Sure Looks Awfully Healthy

#103

Scala is a "scripting language?" Also, >When the JVM implementation of Ruby, JRuby, added native support for this instruction, its performance zoomed past the C-based Ruby VM, which for years has been the Ruby reference platform. As JRuby's performance continues to pull ahead, I fully expect it to become the reference implementation. Certainly, it will become the vehicle by which most organization first try out Ruby.…

Scala is awesome but not a scripting language. Running Scala as script is insane as it takes 1 or 2 seconds to start the JVM/Compile/Execute a fairly large Scala file. You dont want to use that on your server for scripting purposes.

Ruby,Python or PHP are more suited for scripting tasks(especially Java code generation,i'm writing an Android app generator right now,since i was tired of all the boilerplate : json+php script = Activity classes , resources files , ContentProviders generated in less than 0.2 seconds no matter how many tables I need for my apps,saves me hours of work).

Re: If Java Is Dying, It Sure Looks Awfully Healthy

#105

Java may not be dying, but it does take off early on Fridays for golf. Java is not dying the same way Cobol was not dying 10 years ago. It has a lot of legs left but nobody is 'hoping' to use it, they are told to do so. Java is and always has been almost completely a corporate tool. Again, like Cobol, so the 'cool kids' are not going to give it much love. It's too slow to execute to compete with C++, its too slow to…

So which hip languages are these "thought leaders" using now?

Re: If Java Is Dying, It Sure Looks Awfully Healthy

#106
post #71
post #44

Earlier quoted context omitted.

Java is not as fast or faster than C(++). The assertion always makes me cringe. I won't say Java is slow(though the startup time is annoying for some tasks), as it does perform better than many languages. But how does it make sense to you that a platform written in C can produce results faster than C is capable of?

I agree that C code is currently faster than Java in most benchmarks: http://benchmarksgame.alioth.debian.org/u32q/benchmark.php?t... There is no contradiction that a compiler written in a language with expensive semantics (say python), could compile a program written in another language (say C) to produce highly efficient machine code. The JVM operations, such as JIT compilation and garbage collection, are bound by…

> There is no contradiction that a compiler written in a language with expensive semantics (say python), could compile a program written in another language (say C) to produce highly efficient machine code.

Maybe not a contradiction in logic, no. But in practice the compiler has to solve a problem that is much harder than the problem the programmer would have to solve to write efficient C code for this one case. It's also one that has different complexity.

So you're in the situation now that a few compilers (VERY few, though this is very very hard to do) will actually beat stupid programmers in optimization, but there is nothing any compiler can do to beat the optimizations a good programmer will implement.

As for startup time, the sad part of that is that is one area where you could really improve C/C++ : startup time. Right now a C program has 4 distinct things that need to run before main() starts, and involve quite a bit of calculation, C++ has a lot more (the various kinds of initializers which can cause arbitrarily complex calculation).

A lot of these initializers result in constant (and small) memory layouts, and could in fact be run at compile time. What you generally do in initialization phase is to calculate registered classes (e.g. for serialization, or protocols) and make indexes of them. Maybe even compile regexes. All of that could be optimized to occur at compile time (as long as memory usage of the code is reasonable).

Re: If Java Is Dying, It Sure Looks Awfully Healthy

#107
post #105

Java may not be dying, but it does take off early on Fridays for golf. Java is not dying the same way Cobol was not dying 10 years ago. It has a lot of legs left but nobody is 'hoping' to use it, they are told to do so. Java is and always has been almost completely a corporate tool. Again, like Cobol, so the 'cool kids' are not going to give it much love. It's too slow to execute to compete with C++, its too slow to…

So which hip languages are these "thought leaders" using now?

Python, Ruby, Javascript, JVM-hosted languages like Clojure, Scala, and newer languages still in development like Elixir, I'm sure I'm missing some. Haskell is perpetually 10 years ahead in programming research but sadly it functionally lacks support for day-to-day scripting tasks.

Re: If Java Is Dying, It Sure Looks Awfully Healthy

#108
post #79

Earlier quoted context omitted.

I hope I get no down votes from the following comment. This is not true, C# can be thought as superior to Java, only if you intend to be completely immersed in the Microsoft stack and this assertion is still debatable. I personally like Java more than C# just because Java is truly platform independent and fully open source. When you have two similar software products the one which is open source will always be a bett…

To be fair, Mono exists, and contains a free implementation of C#.

Of the language, not the libraries or tooling.

A language is much more than just syntax.

With mono, one ends up writing C# code similar to C and C++, with #ifdefs, or having to search for .NET libraries that are cross platform.

Re: If Java Is Dying, It Sure Looks Awfully Healthy

#109

Earlier quoted context omitted.

I think generally the libraries in Java help programmers use data structures that make the language seem faster (trees/hashes) . These structures exist in c++ but aren't as easy to use so aren't used as frequently. Those processors extensions will make mathy c++ code significantly faster. When I was on an ada project all the mathy code was written in c/c++ for speed. Pretty amazing the difference.

What? C++ comes with robust trees & hashes via the STL, along with a pretty extensive library of algorithms that work on all the STL containers. And, unlike Java, C++ lets you pack value objects contiguously in memory, which can be a massive performance win due to better cache behavior/no pointer chasing.

Being discussed for Java 9 and already available on IBM J9 JVM.

http://www.slideshare.net/mmitran/ibm-java-packed-objects-mm...

Re: If Java Is Dying, It Sure Looks Awfully Healthy

#110
post #90

Earlier quoted context omitted.

Popular in terms of use, yes, but liked? I don't know, I doubt it. Android and iOS essentially force you to use Java or Objective-C respectively. I don't hate Java, but I don't like it either. It lacks quality of life features that other, similar languages have had for years. I can't stand writing code in it if I don't have to (and don't get me started on Objective-C...) From what I hear from others and read on a wee…

> and don't get me started on Objective-C.. itsNotTheLanguagesFaultPerSe:butIfTheFunctions:andTheirParameters:werentNamedLikeThis:itWouldBeBearable

I love named arguments. I wish my programming language of choice had them.
Post reply on HN