Comment by gf000
14 hours ago
Java is basically the "greenest" managed language out there, so not sure putting it into the same list for energy efficiency is warranted. Though of course energy efficiency is fundamentally linked to memory usage, not destructing/collecting dead objects will increase memory usage but increase efficiency.
https://www.sciencedirect.com/science/article/pii/S016764232...
Reading your link IMHO in today's world I would set a basic rule, if you're touching >20% of a Java codebase you should refactor to Rust. With AI-Native development practices it's worth the SDE time to refactor, replace the underlying subsytem and reduce your fleet by 50% or more.
Unless you are doing something very specific where rust is truly the best choice, I have to disagree.
Rust has overly strict locking (otherwise it couldn't determine safety) that makes certain concurrent algorithms harder to implement, its concurrency model is significantly more complex (for an absolutely good reason, it's a low-level language where the developer should be in control), meanwhile for many applications Java can just have you write ordinary blocking code and they will automagically turn into non-blocking.
For most domains Java has a richer "industry-strength" library ecosystem, and absolutely not even close observability tools. So not really sure what would one win for e.g. a typical backend service doing web and db requests.
> not really sure what would one win
Internet pointz
I encourage my competitors to refactor a working codebase into a different language.
Ideally by adopting a different architecture at the same time so they fix everything that is troublesome in their existing product!
You hate Java so much you think AI code is better? You're not even getting memory safety from the deal, because Java already has it.
JIT gives you almost native performance. AI rewriting tools give you none of the knowledge of running the thing in production. A couple of noticeable mishaps could cost more than halving your fleet saves.
better than native, sometimes, due to the ability to profile and do profile guided recompilation at runtime
Indeed, the Java mobile platform had power consciousness baked in 25 or so years ago.