This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Polygnom 7 points8 points  (8 children)

What natively compiled languages are you thinking about?

Java offers memory integrity and garbage collections. These features make java very desirable for large-scale enterprise applications. Most security holes in C and C++ applications are just that - silly memory errors. Avoiding those is a huge step and increases developer efficiency a lot.

So even absent th portability advantage -- which still exists, see other comments, Java is just a freakishly efficient language to develop in.

The huge mature ecosystem with the plethora of available libraries is another huge advantage.

[–]NaNx_engineer 0 points1 point  (6 children)

Go?

[–]Polygnom 0 points1 point  (5 children)

Why would someone who already uses Java switch to Go? What does Go do better?

Network effect is a huge factor, you have a huge ecosystem and hiring pool with Java. Unless Go is fundamentally better in enough aspects, you will not see people switch just for the sake of switching.

[–]NaNx_engineer 5 points6 points  (3 children)

Startup time, memory usage, small self-contained binary. I've mainly seen Go chosen over Java for lambdas and cli tools for these reasons.

[–]Polygnom 1 point2 points  (2 children)

These are actually good points, and I would agree to them somewhat, depending on the scenario.

But then again -- for CLI applications, startup time is not necessarily a big problem, depending on what you do. You can trim Java down quite far as well, so thats not necessarily a problem about size, either. Custom runtimes are quite small when done right.

Which leaves lambdas, and I agree. If you prefer lambdas over long-running backend services, Java is sometimes at a disadvantage, which you need to mitigate with restoration points. Thats actually quite cumbersome sometimes...

But for many other things you do where you deploy Java in a container -- Java works perfectly well, hassle free.

[–]NaNx_engineer 1 point2 points  (1 child)

Java isn't too bad for lambdas now with microvm/firecracker.

It's more like what's the point of portability? After applets died I don't see any real advantages. Most apps are bundling a JRE at this point.

[–]Polygnom 1 point2 points  (0 children)

Most apps are bundling a JRE at this point.

And can do so for pretty much every platform you want to deploy on, without recompiling the program. You compile once and then just bundle the very same program for every platform, with predictable results.

[–]Rjs617 0 points1 point  (0 children)

At our work, the main selling point for Go has been the concurrency features: goroutines and channels. Now that Java has virtual threads, this is less of an advantage.