upvote
> Java, and other languages like it, often drop into unsafe code where it's far weirder and less supported because they have to because the languages are too slow to do the work they want to do.

No, that's not been the case for a while, at least since the introduction of VarHandles and FFM (which is why Unsafe is now in the process of being removed altogether). Of course, there's nothing slow in Java code; it compiles like C or C++ or Rust or Zig, sometimes with more aggressive optimisations and sometimes with less aggressive ones. Unsafe mostly used to be used for certain memory operations before VarHandles and FFM.

> And obviously you have all of the complexity of a massive, JIT'd runtime written in C++.

No, that's also inaccurate. The "massive runtime" is largely a compiler (and it doesn't matter what language that's in), and memory management, where the Rust runtime is also about as massive and written in C (the various malloc/free implementations).

reply