Live data from Hacker News

If Java Is Dying, It Sure Looks Awfully Healthy

drdobbs.com

231–240 of 327 posts

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

#231

Earlier quoted context omitted.

Comparing Java to Cobol is ridiculous. I'm in the cool kids category and I like Java. If you don't want to / can't use C#, there's simply no alternative for bigger projects. Groovy - slower, much worse toolability Scala - less readable, slower, slow compilation, worse toolability, too complex.

What are these bigger projects which can only be implemented in java? The linux kernel? Photoshop? Facebook? Or some kind of godawful tiered corporate thing that's big and unwieldy precisely because it's implemented in java?

What are these bigger projects which can only be implemented in java?

can is probably an overreach, but I expect the author was referring to the wide range of projects like Hadoop, Solr, etc.

If you want static typing, decent performance (and especially if you want a wide range of people who can work on your software) then you have C++/C# or Java. Or you are feeling adventurous or are ex-Google then maybe Golang.

There are other languages of course, but for most you are going to be struggling to find programmers who know them and library support isn't there, so you are writing lost of stuff yourself. If that's what you like, then fine.

If you don't want static typing, then there's a much broader range of course.

Or some kind of godawful tiered corporate thing that's big and unwieldy precisely because it's implemented in java?

Believe me, godawful corporate things are unwieldy in whatever language they are written in.

Have you ever seen a corporate Rails app? The saying "it compiles so it must work" is supposed to be a joke, but I've seen Rails apps where a large amount of the app would never have compiled if Ruby had a compile step. But then they did claim that Rails was an improvement because they could develop faster with out the compile cycle. Most of the app didn't work, but yes.. I concede that not having to make sure it worked did let them get in on servers faster.

Scary but true.

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

#232

Earlier quoted context omitted.

Could you substantiate your statement please. I find that he is in a good position to do so because C++ evolved based on feedback from people using it and he was responsible for the first version(s).

Sure. Nowadays the consensus is that C++ introduced more problems into the industry than it solved. Moreover it keeps introducing more and more problems with each new revision. In this light his statement is merely an attack upon his critics e.g. "Haters gonna hate..." while ignoring the possibility that criticism of "his" programming language is well founded. Sure people bitch about every language sometimes. Hell I…

"While systems programmers are fleeing from C++ back to C(!!!)"

Example? I know of new developments in systems programming written in C++ (LLVM, clang, WebKit, FireFox (or did that start in C?)), I know of some that moved from C to C++ (gcc, maybe FireFox), I know of new developments in C (Linux, git), but I not aware of any system going from C++ to C. They may exist, but I would need more than a few examples to be convinced of the existence of a general trend.

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

#233

Earlier quoted context omitted.

Comparing Java to Cobol is ridiculous. I'm in the cool kids category and I like Java. If you don't want to / can't use C#, there's simply no alternative for bigger projects. Groovy - slower, much worse toolability Scala - less readable, slower, slow compilation, worse toolability, too complex.

What are these bigger projects which can only be implemented in java? The linux kernel? Photoshop? Facebook? Or some kind of godawful tiered corporate thing that's big and unwieldy precisely because it's implemented in java?

IntelliJ IDEA or Android. Of course, you could use any language for a big project but unless you have specific requirenments (usually C-like performance), Java / C# is the best choice.

Photoshop - Needs C-like performance for image processing parts. If they started development today, I think they would go with a C# / C++ hybrid.

Facebook - The fact that they had to write their own PHP compiler is telling. PHP is nowdays quite similar to Java without the tooling, performance and massive ecosystem.

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

#234

Earlier quoted context omitted.

Isn't not needing to know whether an object property is real or synthetic a feature?

Huh? Of course it is a feature. My point is that if something as innocent looking as property access can be an arbitrary method call, it may make understanding a piece of code more difficult. From the point of view of debugging existing code, which I've done a lot lately, hiding details that may matter in corner cases is not something that I want the language to encourage.

So you're against pretty much all encapsulation then?

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

#235
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?

> But how does it make sense to you that a platform written in C can produce results faster than C is capable of?

It's actually quite easy.

Now, of course for every Java program there exists a C++ program that performs at least as well – proof: the JVM – but that doesn't mean that that program could be written by humans at acceptable cost. The JVM does a lot of optimistic inlining that's simply not possible in C/C++ (in those languages you'll need to write the same code lots of times).

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

#236
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?

Concurrent data structures (hazard pointers don't perform as well as an implementation with a GC).

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

#237
post #84

With Hadoop, Lucene, Solr, etc. written in Java, there is no doubt that Java is here to stay. None of these libraries (or many others) have competing implementations written in other languages.

"None of these libraries (or many others) have competing implementations written in other languages." Except the ones they were written to copy. Each example you give is an open-sourced clone of an pre-existing version implemented in a different language.

That's not true at all, Lucene is a Java project from the beginning, and has since been copied to virtually every other environment because it is such a kick-ass indexing engine.

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

#238

Earlier quoted context omitted.

Comparing Java to Cobol is ridiculous. I'm in the cool kids category and I like Java. If you don't want to / can't use C#, there's simply no alternative for bigger projects. Groovy - slower, much worse toolability Scala - less readable, slower, slow compilation, worse toolability, too complex.

If you don't want to / can't use C#, there's simply no alternative for bigger projects. People keep repeating this as it was some sort of axiom. My feeling is that people mean that it's hard to write large Java-like projects outside Java. It's not the the problems can't be solved without Java, it's that you "can't" solve them the Java-way without using Java or C#.

What other statically typed language is similarly fast, has massive ecosystem and great tools? (You need static typing to have Java-like tools.)

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

#239

Earlier quoted context omitted.

If you don't want to / can't use C#, there's simply no alternative for bigger projects. People keep repeating this as it was some sort of axiom. My feeling is that people mean that it's hard to write large Java-like projects outside Java. It's not the the problems can't be solved without Java, it's that you "can't" solve them the Java-way without using Java or C#.

What other statically typed language is similarly fast, has massive ecosystem and great tools? (You need static typing to have Java-like tools.)

Now you're just adding more axioms :)

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

#240
post #214

Earlier quoted context omitted.

Haskell has multiple concepts that are so compelling that I do not understand why most of the new languages make no use of them. Very handwavy, here are a couple of them. - Type inference: strong typing at the convenience of weak typing. (Some languages are moving towards this. C++ stapled on `auto` keywords, Rust is designed using it) - Type classes: unifying things that "can do X", allowing the programmer to write…

C# has had type inference for a long while. It's a pain using Java, which doesn't. C# also sort of implements type classes. For your example, there's IComparable in C#; implement it and a List can be directly sorted. For pure functions, there's the [Pure] attribute, but it isn't enforced by the compiler, it's just a contract, a promise.

Yes, there are languages that also have these features, the puzzling part is why not all of them do (except those that may have good design reasons not to).
Post reply on HN