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).
> 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).
Unsafe is still plenty prevalent in Java, nor is the use of C++ libraries.
> sometimes with more aggressive optimisations and sometimes with less aggressive ones.
Yes, well, that's some handwaving.
> Unsafe mostly used to be used for certain memory operations before VarHandles and FFM.
Yes. It is still very prevelant.
> 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).
Ridiculous. "largely a compiler" - it's a JIT compiler, as in it's a runtime compiler that allocates executable code at runtime and then runs it. (a) Of course it matters what language it's in (b) JITs are an incredible source of security issues and have their own set of mitigations that have to be applied.
> where the Rust runtime is also about as massive and written in C (the various malloc/free implementations).
A ridiculous comparison.
It really does, though. Perhaps you're unfamiliar?
> Unsafe is still plenty prevalent in Java, nor is the use of C++ libraries.
My statement was that unsafe is much more prevalent in Rust than in Java, and that is true.
> Yes, well, that's some handwaving.
I'm sorry that I can't teach you principles of compilation here, but feel free to dig deeper.
> Yes. It is still very prevelant.
Much less than in Rust.
> Ridiculous... A ridiculous comparison.
You don't sound like either a runtime or compiler engineer at all, or you wouldn't have found any of this ridiculous in the least (or news). In that case, I hope that telling you that what I wrote was true might enrage you enough to learn more about these subjects, and perhaps our community will have grown by another member.
You won't be specific so now you're putting me in a position to have to build your argument for you. It's frustrating because the conversation is already stupid. Java is a language so calling it compiled or interpreted or AOT or JIT is already a mistake, those are implementation properties of how it is deployed.
The massively most popular implementations rely massively on JIT, even if they have varying levels of AOT support.
This is so obviously different from actual AOT languages. Hence having to call it AOT when it's Java.
> My statement was that unsafe is much more prevalent in Rust than in Java, and that is true.
That's an empirical claim. You can go ahead and support it.
> Much less than in Rust.
Riiiight. No one uses Netty, right????? They had such an easy job ditching Unsafe, right??????
> You don't sound like either a runtime or compiler engineer at all, or you wouldn't have found any of this ridiculous in the least (or news). In that case, I hope that telling you that what I wrote was true might enrage you enough to learn more about these subjects, and perhaps our community will have grown by another member.
And I recognize your name well enough that you don't know much of anything.
This is silly. Rust also has tooling for dealing with unsafe - tools for proving unsafe code, tools for verifying unsafe code, tools for fuzzing it, etc.
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.
And obviously you have all of the complexity of a massive, JIT'd runtime written in C++.