this post was submitted on 04 Nov 2024
11 points (65.7% liked)

Programming

17666 readers
354 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



founded 2 years ago
MODERATORS
top 10 comments
sorted by: hot top controversial new old
[–] nous 20 points 1 month ago (1 children)

Of these 25 reasons, most apply to a lot of languages and are far from Java exclusive or even java strong points. Pick any mainstream language and you will hit most of the benefits it lists here. With quite a few being almost meaningless. Like this:

Java/JVM/JIT can achieve runtime optimization on frequently run code, especially on something that’s running as a service so that you avoid the overheads from JVM startup times.

Compiled languages generally don't need a JIT or to be optimized at runtime as they are compiled and optimized at compile time. And most language that don't have a runtime like Javas already run faster than Java without its heavy startup time. Language with JITs are generally interpreted languages which have these same benefits as java lists here. Though do often suffer from other performance issues. But really at the end of the day all that really matters is how fast the language is and how good its startup times are. Java is not ahead of the pack in either of these regards and does not do significantly better then other languages in its same class (and often still drastically sucks for startup time).

Or

Much of a company’s framework can be stable Java, with Scala or Clojure-backed business logic.

Many languages you can embed other languages inside. Nothing really special about scala or clojure here except that they work well with java. And I don't really see this as a major benefit as most places I see dont separate their core code and business logic into different languages.

And the remaining issues that are more java specific are:

Java was one of the first mainstream GC strongly typed OOP languages. So it got its niche.

Java has been one of the main programming languages taught in colleges and universities in the last few decades.

Java’s Legacy Migration: Many banks in particular migrated legacy systems to Java in the early 2000’s when it was getting a lot of popularity and the industry was collectively in the midst of a huge OOP fever dream.

Which all paint a picture - it was popular long ago and taught in universities and lots of business pushed it when back in the day. And now it is hard to move off it.

And lastly:

Oracle

What? How is this a point? If anything this should be a massive negative.

Not exactly 25 reasons to pick java in financial enterprise.

[–] GetOffMyLan 8 points 1 month ago* (last edited 1 month ago) (2 children)

Actually jit languages can outperform compiled languages by using runtime analysis to perform tiered compilation and profile guided optimisations.

C# has made some great strides in this regard.

All the normal optimisations are applied when it is compiled to byte code. Like loop unrolling etc.

Then once it detects the hot paths during execution it can apply even more based on how it is called. It can also do optimisations that aren't possible at initial compile time.

Dynamic PGO it's called. It's a really interesting topic.

[–] nous 5 points 1 month ago (1 children)

Can when the specific situations are reached in very micro benchmark situations. But overall on aggregate you find even JIT languages don't strictly outperform pre compiled languages for general workflows when looking at languages of a similar class. When you compare them to compiled languages like C/C++/rust/zip (aka ones without a GC or much of a runtime at all) then JIT languages fall behind like all other GCed languages.

[–] GetOffMyLan 3 points 1 month ago

Most of the time yeah. But it depends as you can write c# with very little GC use if you avoid allocations.

Ahead of time compiling also gets things much closer. But then you lose runtime optimization.

[–] Feyd 5 points 1 month ago (1 children)

You can do PGO with GCC, though it takes extra steps of course

[–] UFODivebomb 4 points 1 month ago

That does constrain the optimizations to a profile determined prior to the end user. Which is hopefully the same but might not be. Shared code between applications also is a challenge.

[–] [email protected] 12 points 1 month ago (1 children)

reason number 1:

we're stuck. he l p

[–] Kissaki 5 points 1 month ago* (last edited 1 month ago)

he l p

looks like a multi-threading or concurrency issue

[–] [email protected] 8 points 1 month ago

This is a whole lot of bullshit. The first arguments are the only real arguments for large enterprises. Maturity, stability and broad adaptation. And maybe the fact that Oracle can be bribed to keep releasing security patches for long obsolete jdks

[–] 0x0 3 points 1 month ago
  1. No shit?
  2. That kinda makes sense... same strategy MS uses.
  3. Is it though? Yes, i know about OpenJDK.
  4. Less likely to crash, sure, it'll just hog memory instead...
  5. Aaaaah now we're getting somewhere...
  6. eeww

But this isn’t a significant issue if you’re a large financial enterprise with lots of money to hire lots of devs.

Lots of money, sure. For devs? Not really.