News for hackers. Stuff that matters.
Re:"No way to prevent this" say users of only language where... by jstimpfle on Wednesday May 22, 2024 @04:47AM (#40438814)
The more you take away, the closer you are to a simple but unsafe language. If you remove the "unsafe" keyword, many things you can't solve easily nor optimally.

You might be able to outsource some complexity to external libraries, but integrating libraries is itself a major headache, and it can lead to security issues too.

Re:"No way to prevent this" say users of only language where... by marcyb5st on Wednesday May 22, 2024 @05:55AM (#40439176)
Fair enough. But unsafe for kernel code I guess it's a necessary evil (that's why I didn't mention it).

However, I believe the being "opt-in" by explicitly marking sections unsafe is the way to go instead of having unsafe by default (which is the only way using C).

Re:"No way to prevent this" say users of only language where... by superb_dev on Wednesday May 22, 2024 @02:08PM (#40444093)
Unsafe is a daunting language feature, but ultimately it’s a feature. You’re meant to use it if you need it.

You don’t need to outsource complexity anywhere. Rust is fully capable.