Hacker News new | ask | show | jobs
by theamk 58 days ago
The question is how to tell which code is unsafe. In some languages it is easier, in some languages it's much harder.

For example in C and in C++, every line is potentially unsafe, so you have to verify the entire program very, very carefully.

On the other hand Java is safe, unless you mess with JNI. This is a very infrequently used feature, so for most programs you can be 100% sure there are no certain class of safety issues.

Rust has specific "unsafe" keyword - if you see it in a program, you have to be very careful. You can write quite a lot of Rust without ever using it.