Live data from Hacker News

If Java Is Dying, It Sure Looks Awfully Healthy

drdobbs.com

251–260 of 327 posts

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

#251
post #156

Earlier quoted context omitted.

I think C has kind of hit equalibrium, in that it's not often used for things outside its "niche", but with no other language threatening it within its niche.

Is forth considered to be in the same niche?

Not really. Forth is nowadays only used for tiny embedded systems.

In contrast, C is the glue language for pretty much everything. Even the latest operating systems like iOS and WinRT use C as the base level API language that is callable from anywhere. They do have significant libraries and conventions to manage that (Apple uses CoreFoundation, Microsoft uses COM), but it's still C.

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

#252
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#.

Infrastructure of Mono is not in any way comparable to proper c#. Also how come MonoDevelop's latest version doesn't work on Linux? On Windows it became Xamarian and it is ok ish, but I would not use it for a major project, refactoring tools are more or less non existant. On Linux they are stuck with the old version of MonoDevelop

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

#253

Earlier quoted context omitted.

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

I find the descriptive nature of method signatures to be quite delightful. Unlike other languages like C++, I don't always have to go looking for the function definition to see the types of the parameters it takes, and what exactly was the order again? Combined with Xcode's autocomplete, it saves a lot of time. I shed a small tear every time I have to call a C API with and endless parade of (NULL, NULL, 0, NULL).

> I don't always have to go looking for the function definition

That's because you get it inline for you with Xcode's autocomplete. IDEs do this for other languages, and the effect is the same.

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

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

Mostly English. In ridiculous quantities.

I miss thought leaders using French, or Latin :-(

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

#255
post #226

Earlier quoted context omitted.

C++ gives you the option to just put your objects on the stack and have them clean themselves up upon destruction. Enforcing the placement of small objects on the heap, even a garbage collected heap, seems such a waste of time and efficiency. You shouldn't really use the term "always" either. You have the option of implementing a garbage collector manually, or an object memory pool to remove the malloc/free new/delet…

> C++ gives you the option to just put your objects on the stack and have them clean themselves up upon destruction. Modern machines have, I don't know, say, 64GB RAM? How much of that can you use for thread stacks? 1GB tops? Modern applications work with really big heaps. Stack allocation is irrelevant for most of what the application is doing. > Enforcing the placement of small objects on the heap, even a garbage c…

> Stack allocation is irrelevant for most of what the application is doing.

Well I disagree with that. In C++ it is quite common for most objects to be allocated on the stack. I have never heard stack allocation being described as irrelevant. Of course if the language puts everything on the heap then that statement might be true.

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

#256

Earlier quoted context omitted.

"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.

So in no way did they copy Google's which is implemented in C++ ?

Though I agree with OP - these projects and Java are here to stay for the foreseeable future.

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

#257
post #240

Earlier quoted context omitted.

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).

Its hard to implement type inference and type classes unless you carefully design the language to accommodate it from day 1. For example, return-type polymorphism (functions like `read` or `return`) is particularly tricky, specially in the more dynamic languages.

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

#258
post #115

One of the huge advantages of Java's static typing + somewhat boring/verbose syntax is that it makes writing powerful tools for manipulating Java code far, far easier than any of the C-based languages with preprocessors or any dynamic languages. After working in IntelliJ for a while with its phenomenal refactoring tools going back to any other coding environment feels somewhat stone age in comparison.

I have been using IDEs since the mid-90's, that is my feeling every time I see anyone coding as if UNIX System V was the latest version available.

I don't use IDEs, but it seems that there are only 2 or 3 that really work: Visual Studio for C/C++, and Eclipse/Intellij for Java. Do you use one of those?

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

#259

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.

I do miss those in Go.

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

#260
post #37

"Java is dying" is wishful thinking. It's not the case, but we can only hope it will be. Currently, it does a good job of marketing to developers too good for Ruby and Python and not good enough for C.

I understand the "not good enough for C" comment, but why "too good for Ruby and Python"? Not trying to pick a fight, just would like you to elaborate.

Welll, the reasoning behind it might be from two facts - a) Ruby and Python both are far better beginner/learner languages than Java & others - I mean, if some kid wanted to learn programming, I'd suggest to start in those because they don't have distracting boilerplate; and (b) other things being equal, Java does get you better execution performance than Ruby/Python; not on C level but it's halfway in between.

But still "developers too good for Ruby and Python" is an interesting statement; IMHO the only ones who'd claim to be 'too good' for Python/Ruby would be authors of their own languages or maybe the hardcore Lisp or Haskell crowd.

Post reply on HN