Live data from Hacker News

If Java Is Dying, It Sure Looks Awfully Healthy

drdobbs.com

131–140 of 327 posts

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

#131
post #96
post #75

Earlier quoted context omitted.

Most standard complaints are over 10 years old, people should just get over it. The IDEs are a little fat and I/O hungry. If you don't have a beefy machine, just get a SSD, and that problem is gone. Spring is great, but JavaEE6 simplified things further standardising things like CDI, JPA, JSF, Jersey, etc... (also, JavaEE7 was just released). It's actually a pleasure to write web apps in Java nowadays. Great IDEs, de…

Jersey is a true joy. It's really a nice way to write restful apps. I never liked Spring. And large enterprise apps' source code makes my eyes hurt. However, none of this is a reflection on Java or the JVM itself. I think we'll have another 40 years of people predicting the end of Java until we realize it's interwoven into every aspect of computing and can't be tossed out any more easily than C or C++ can be. The JVM…

Jersey is a true joy. It's really a nice way to write restful apps.

It's actually mostly JAX-RS which is a joy, and allows you to swap out Jersey for e.g. RestEasy with very little work.

I never liked Spring. And large enterprise apps' source code makes my eyes hurt. However, none of this is a reflection on Java or the JVM itself.

I agree. I hate Spring. Spring, J2EE and pre-JIT Java have probably done most damage to Java's public image. JAX-RS is very nice and lightweight. Play is brilliant, if you can deal with mixing in Scala here and there.

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

#132
post #122
post #43

I'm surprised nobody has mentioned Android yet. When you add in the Android factor, Java is probably still one of the most widely used programming languages today. It's funny the article straight away brings up the verbosity argument as well. You want to talk about verbosity - take a look at Objective-C and Cocoa (again, hugely popular today!)! Personally, I quite like Java.

> I'm surprised nobody has mentioned Android yet. When you add in the Android factor, Java is probably still one of the most widely used programming languages today. Except that Oracle was right into suing Google, after all. Google hasn't improved the language level beyond Java 6 grammar. So nowadays one is forced to write in Java 6 when targeting Android, which is really a pain, specially when writing libraries. Thi…

> Google hasn't improved the language level beyond Java 6 grammar.

That's because Oracle has been suing them over it. Dalvik hasn't changed in years thanks to that lawsuit. Google was steadily improving Dalvik right up until that lawsuit happened, then it came to a screeching halt. That's not a coincidence.

And really, what Java 7 language level features were there that makes it problematic that Android still runs Java 6? The good stuff was dropped from 7 and pushed to 8. 7 is boring.

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

#133
post #25

Earlier quoted context omitted.

I'm fairly certain Java and C++ have comparable speeds, and I think in someways Java's faster.

Java runs about 2x slower than C++ for general CPU-bound stuff - (although it does use much more RAM). That sounds slow, but it's faster than most other languages out there. However, C++ does give you the ability to more easily use processor extensions (SSE, AVX, etc), which you can't use from Java AFAIK - which makes a big difference in performance for certain applications.

> C++ does give you the ability to more easily use processor extensions (SSE, AVX, etc), which you can't use from Java AFAIK

C++ does not support any processor extensions, they are not defined anywhere in ANSI/ISO C++ language standard.

They are a language extension not guaranteed to be available in all C++ compilers in the same form, thus not portable.

Java can make use of processor extensions by writing a small Assembly snippet callable via JNI.

Which is actually similar to what is required in C and C++ code, when writing "portable" code that should compile in various compilers.

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

#134

Earlier quoted context omitted.

Java runs about 2x slower than C++ for general CPU-bound stuff - (although it does use much more RAM). That sounds slow, but it's faster than most other languages out there. However, C++ does give you the ability to more easily use processor extensions (SSE, AVX, etc), which you can't use from Java AFAIK - which makes a big difference in performance for certain applications.

I've read that you can call asm from java directly using jni (i.e. without a c wrapper) though I've never done it myself.

And nobody else has too.

You use jni to call libraries somebody else made (opengl?), you don't plan your project around using jni.

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

#135
post #44
post #25

Earlier quoted context omitted.

I'm fairly certain Java and C++ have comparable speeds, and I think in someways Java's faster.

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?

Slow C compiler was used to write fast C compiler?

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

#136

I primarily use java in my day job, and although there's a lot not to like about it, some standard complaints are somewhat overblown. For example, nothing really forces you to use long variable/method names, but even if you do, a modern IDE -- I use IntelliJ -- with auto-completion makes these fairly painless. It's not like you have to type every letter of "SomeClass.veryLongMethodName()" -- rather, you type "SomeCla…

> In fact, it's unclear to me where java might be optimal.

I'd say server side processing of whatever. That's what we use it at work for, and I don't see how any of the mainstream languages would be much, if any, better. Our software has to run on our customers' servers, so portability is of utmost importance since we don't want to need to compile it for random OS's. This rules out languages that need native binaries. Performance is also important, since people don't want to buy bigger machines just because you wrote your software in Python/Ruby/whatever and is 10+ times slower than it needs to be. Also, our software is old enough that C# didn't even exist for many years.

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

#137
I use Java, C, C++, Python, Ruby/jRuby, bash, Perl, etc.

The right tool for the right job. Anybody making unconditional statements about the decline (or not) of a language is a fool (IMHO).

Likewise saying the "C++ is better than Java", or "Java is better than Python" or ... is devoid of any meaning without specifying the domain of the problem to be solved.

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

#138
post #14
post #9

Earlier quoted context omitted.

This comment is laughable at best. Ignorant might be a better word for it.

Care to elaborate? Here's the 12 GB of memory... http://www.datastax.com/docs/1.0/operations/tuning As far as the language is concerned... What problem of high performance & complexity apps does Java 7 solve that C++11 doesn't?

Portability, memory safety, speed of compilation, retaining the sanity of developers.

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

#139
post #26
post #8

Earlier quoted context omitted.

Yes, that's why kernels are written in java. If you're writing complex code java is rarely the answer as it requires so much complexity itself. Hint: Most java projects just appear to be complex because of the poor quality of the language (and developers). Java is hands down the choice for simple projects written by way too many poor quality developers. The JVM can barely manage 12 GB of memory, Java is a piece of cr…

I would venture to say, with no facts or figures mind you, that if you were to evaluate the number of lines of code dedicated to kernel programming to that of applications running applications on the Internet, that the resultant figure would be so small for kernel code that it would look like kernel development doesn't even exist. Saying that developers who use Java are poor quality is also an awful thing to say. Yes…

> Saying that developers who use Java are poor quality is also an awful thing to say.

You can't have a medium to large Java thread on this site without a lot of people deriding Java developers. It's practically a law of nature.

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

#140
post #43

I'm surprised nobody has mentioned Android yet. When you add in the Android factor, Java is probably still one of the most widely used programming languages today. It's funny the article straight away brings up the verbosity argument as well. You want to talk about verbosity - take a look at Objective-C and Cocoa (again, hugely popular today!)! Personally, I quite like Java.

Android doesn't really count as java, as it doesn't use the JVM.

But even if you do choose to count it, it's only a very small part of the java ecosystem. Applets are dead, and java desktop applications unpopular, but without you necessarily seeing it, enormous amounts of server side software are made with java. If it hadn't been Java, it would have been some other language, but the fact is that there is such an enormous ecosystem of high quality libraries, tools, infrastructure and experienced programmers, architects and devops built around Java and the JVM that I don't see anything toppling it from the #1 position any time soon.

C#, being a better designed and more rapidly evolved language, might have displaced it if Windows rather than Linux had become more popular as a server OS, but it didn't, and now it won't, so that is moot.

Post reply on HN