Comment Re:rust community (Score 1) 167
If we define what untrusted code to mean random binary/library from internet that your program downloads at runtime and then executes.
Rust/C++ have no support for limiting what harm that random binary code does. It can do anything and any Rust/C++ compile time protections are moot because the downloaded binary/library is not compiled or checked against the expectations.
Java sandbox (mostly used by applets) is an attempt to allow downloading binary (compiled java classes) from external source and limiting what it can do.
Trusted code is your own source and downloaded external libraries (depending on language the external libraries might be in source or binary format) one compiles into binary.
While building trusted code the type checking of the Rust/C++/Java compilers is applied. Here Rust has the most multithread/data sharing checks.
When handling untrusted input processed by your trusted code the question becomes can it cause untrusted code execution. Java (and other languages running in virtual machines or interpreters) provides the most protections. Generally only cases where safe code is calling to existing buggy C library for the data processing (for example image handling) can it untrusted input become a problem.