Comment by adgjlsfhk1

5 days ago

The counterpoint is that Java has so much SOTA GC work precisely because the language makes writing efficient code that doesn't heavily tax the GC basically impossible.

Tell me you haven't looked at Java in 15 years without telling me.

Given that the vast majority of non-GC language code does a terrible job of managing memory, it's not difficult at all for the JVM to win out on efficient, reliable systems.

  • To be clear, I think that GC is absolutely the right approach, you just need an object model that lets you write idiomatic code that allocates an order of magnitude or 2 less. Once Valhala is (finally) released, the Java ecosystem will start to have the tools to write efficient code (the same tools that C# has had for ~2 decades now), but until then it's just completely impossible to write object oriented code in Java without millions of allocations per second.