3 ms·
The scenario I was imagining and commenting on was about “implementing a JVM with Java’s semantics in Rust”. Of course if we limit the language itself to safe R
by kaba0 3y ago
The scenario I was imagining and commenting on was about “implementing a JVM with Java’s semantics in Rust”. Of course if we limit the language itself to safe Rust, we get data race freedom, but at a quite significant price for a high level language (it constraints possibly correct programs down a lot). But Rust would not help with relation to the primitives here at all (implemented in C++/Java).
- TheDong 3y ago"Rust wouldn't help" "This bug can't be implemented in rust" "I meant that Rust doesn't fix the bug in Java. Even if you write rust code, you can also write buggy java code too so rust didn't fix the java code" You're the only one here who thought "rust" meant "java semantics implemented in rust" in this context.
- kaba0 3y agoBecause in case of the problem at hand, this is a complex interplay between Java's standard library's Java code and the underlying JVM. There is not much to discuss regarding "rust would make the code safe", because so does JS as it is single threaded.. That's hardly interesting. If we put Java on top of Rust, then no, Rust no longer can help about this. That was my whole point.
- TheDong 3y ago> That's hardly interesting Rust and javascript having differences which prevent this class of bugs might not be very interesting, but it's more interesting than your point. Unless I'm misunderstanding, your point is that a bug in Java cannot be avoided by switching languages to Java.
- kaba0 3y agoNo, my point is that changing the implementation language of java wouldn't have helped here.