5 ms·
Why doesn't anyone rewrite some of these tools in a language that can be compiled to a native binary by GraalVM and benefit of all Java's security guarantees?
by humanfromearth9 2y ago
Why doesn't anyone rewrite some of these tools in a language that can be compiled to a native binary by GraalVM and benefit of all Java's security guarantees?
Would it be too slow? Don't the advantages outweigh the inconvenients?
- KeplerBoy 2y agoRust is trendy, Oracle is the opposite. Of course this isn't a very nuanced or clever take, but certainly part of the truth
- xedrac 2y agoIt's also better in just about every way I can think of, except maturity.
- dpe82 2y agoYou could do similar with the existing C by compiling it to WASM and then compiling that to machine code.
- nicoburns 2y agoWhy use Java when you can use Rust? In all seriousness, Rust is a joy to work with for these kind of tools which typically don't have complex lifetimes or ownership semantics. On top of that you get better performance and probably smaller binaries. But I would pick Rust over Java for CLI tools just on the strengths of the language itself.
- jeroenhd 2y agoWhy go for Java when you can go for .NET? Or Go? .NET seems to perform on par and seems to produce smaller executable, and Go seems to be faster in general. Personally I don't really care what language common tools are written in (except for programs written in C(++), but I'll gladly use those after they've had a few years to catch most of the inevitable the memory bugs). I think the difference is that there aren't many languages with projects that actually end up writing full suite replacements. There's a lot of unexpected complexity hidden within simple binaries that need to be implemented in a compatible way so scripts don't explode at you, and that's pretty tedious work. I know of projects in Rust and Zig that intend to be fully compatible, but I don't know if any in Java+GraalVM or Go. I wouldn't pick Zig for a distro until the language hits 1.0, though. If these projects do exist, someone could probably compare them all in a compatibility and performance matrix to figure out which distribution is the fastest+smallest, but I suspect Rust may just end up winning in both areas there.
- neonsunset 2y agoBecause it’s not a good platform for this at all.