Hacker News new | ask | show | jobs
by ravirajx7 1371 days ago
The main reason behind Java's success has always been the community and it's ecosystem. Once you learn basics you literally can code very good things with ease using a huge number of examples/solutions present on web.

The user base kind of helps the developers find the fixes way too easily compared to any other language.

I doubt it is ever going to lose it's popularity as Java is very good to accept good changes(although slowly). The best thing about java is it provides code stability and backward compatibility and this is the reason it will thrive even more.

1 comments

Java can get the job done, but the language is certainly dated in a way that's impossible to fix without breaking changes.

Similar to C++ getting replaced by go and rust everywhere, Java's time has gone. It's just running on momentum at this point.

The JVM will likely continue on though

Java is still 95%+ of the marketshare of the JVM. Also "C++ being replaced by go and rust everywhere" is very much hyperbolic.

You are either wildly exaggerating or living in a bubble.

C++ still exists because existing projects were written in it... that's it.

There's no value in using it for future projects other than a wider pool of developers to source from... a network effect that will diminish with time.

Java is objectively dated in so many ways, it's not really defensible to say otherwise. Tons of unnecessarily verbose and boilerplate aspects of the language.

That is a very bold claim from basically zero evidence, on both accounts but especially C++ being a zombie language.
Ok, well then provide a counterclaim.

Ignoring network effects and existing libraries, which language feature of C++ makes it better than a Go or Rust for similar use cases? Which language features are more concise and easy to use? What objective traits of the language make it superior?

Ignoring network effects and existing libraries is a good way to make an irrelevant argument. It would be like requiring the Marine Corps to train in BJJ and Kickboxing because that works best in the Octagon. Great, but the Marine Corp doesn't fight in the Octagon.

In general, I'll take a somewhat mediocre tool where I can look up examples/libraries to do everything I need, with a large pool of competent developers to hire from, over an excellent tool that may or may not do everything I need at the level that I need, that relatively few people know how to use.

Of course, standards can change. But Go and Rust have a long way to go to build the network effects/libaries/ecosystem equivalent to that enjoyed by c++. I'll let the enthusiasts figure that out while I build things that get deployed, I look forward to the day it's ready, lot of promising features in those languages. Thanks in advance!

> Ignoring network effects and existing libraries

aka Ignoring the fact that it's easy to hire developers that already have widespread experience in C++, and ignoring the cumulative effort that thousands, if not millions of developers have put into writing and testing code that I don't have to... wait, why would I ignore both of those things?

If I'm creating software in a vacuum, such that I don't have to think about things like developer experience or time-to-market, then sure, let's say that Go or Rust is definitely better for many use cases. Very few people create software in a vacuum!

You started with "C++ getting replaced by go and rust everywhere" (an enormous exaggeration), and now you want to argue about languages features. OK.

C++ is in a state where it's good enough and slowly getting better. The enormous ecosystem, from libraries to game engines like Unreal, means it's not going anywhere for decades. New "greenfield" games are being written in C++ every day.

> C++ still exists because existing projects were written in it... that's it.

False.

> There's no value in using it for future projects other than a wider pool of developers to source from

Well, you know, that is value. And there's value in being in the same language as the libraries you use. And there's value in C++ in the embedded space. And there's value to being able to control memory alignment in the high performance space. And...

If you're writing some generic web service, sure, there's no reason to write it in C++. Your statement was far too broad, though.

> C++ still exists because existing projects were written in it... that's it.

Obviously wrong, but sure, go on.

> Java is objectively dated in so many ways, it's not really defensible to say otherwise. Tons of unnecessarily verbose and boilerplate aspects of the language.

What Java are you talking about? It might have been true in the past, but modern versions of Java are just normal Algols. It's on par with C++, C# and Go, the other mainstream options you'd have for a project you'd write in Java. Sure, it's not as terse as Python, but neither is C++ or C# or Go.

Modern Java is much more terse than golang. No comparison really.
Java the language is far more expressive than Go. Switch expressions, pattern matching, and streams are better than anything Go can offer right now.
Ok, provide the counter evidence then.

Which aspects of C++ are superior to modern equivalents, ignoring ecosystem and network effects which aren't facets of the language.

You made the claim. You should provide some evidence, not just demand that others do...
C++ is still the choice for truly performance-critical applications, period.
Because of network effects, not because of the language itself. Thus dominance will fade over time.

There are many modern languages that are more ergonomic and just as fast.

No, actually because of the language itself.

What matters most in high-performance computing? The algorithm, sure. What's in second place? Memory alignment.

Memory alignment determines whether or not I can use SIMD. It also determines how many cache misses I have.

Can I fight that battle using Rust? Maybe. Is it as convenient as in C++? Is any other language? as convenient as C++?

I can't really see Java's time being gone for large, enterprise-level fintech/banking. Payments, integration with other large-scale systems, etc. Multiple payments or finance departments in FAANGs are still running Java, for example.
You need to separate the language from the ecosystem. Yes, network effects will cause many languages to drag on in use, but that doesn't mean they're going to live in perpetuity.

COBOL was used for a long time for various business backends... did that mean it was a great language that was going to be used in perpetuity? no. And I assume the majority of those don't exist anymore, despite existing as recently as the 2010s

I just think it's weird to say Java's time is gone when Java is still the language du jour in a major employment field of programming. Maybe Java's time is waning but I wouldn't call it gone. New payments/fintech startups and greenfield projects are still choosing Java. I don't know a significant field whose new companies are still going with COBOL from greenfield.

Additionally, what is replacing Java in the finance space? Genuinely asking, because I have no idea, and can you point me to some companies using the stuff that's replacing Java for banking/finance/etc?

Yes, there was a time that C was used for pretty much every app. That time has come and gone as higher level languages became more popular.

So too will Java's. The language itself is objectively more verbose than many modern equivalents. Network effects and existing libraries aren't facets of the language and over time the gap will narrow

That assumes that that minuscule time being spent on writing 3 more characters+ is actually a productivity hit (it is not).

+ I am actually not sure whether even that is true. With how great intellij is, I would honestly wouldn’t be surprised if writing a java program would come out as less keystrokes than the equivalent program in a less verbose language.

Can you please educate me on what are the languages and frameworks that enterprise-level finance and banking are going into in replace of Java? I'm good-faith asking.

Additionally, "the gap will narrow" is not the same as "Java's time is over", which is the only thing I'm having an issue with. Over implies that the gap is already closed, but I don't think it is, and if I'm wrong I sincerely want to know about what the new language du jour of a major employment field is.

C never had the insane hype that Java once did - at the height of its popularity it had an insane amount of mindshare, and probably no language will achieve such ever again. It was literally the only PL that was/is known by laymen.

If anything, the field will fragment a bit more, but java likely never gonna die — cobol and fortran often run in VMs due to the hardware not being as long-lived as them, due to the JVM model, java is not even weak to that.

Don't forget that new release of Java is coming out every 6 months and that (almost) every one of them brings some core language improvement aimed at reducing verbosity. New long-term release is out every 2 years. How many C releases were there in the last 10 years?
Many "modern" companies chose Java for the core of their backend servers, stripe, square, netflix to name a few.
C++ is definitely not replaced by Go, nor by Rust.

C++ as well, but especially Java likely has multiple times as much projects than all the smaller languages summed. They are ain’t going anywhere anytime soonz