News for hackers. Stuff that matters.
Re:Why Rust helps even if you have to use a lot of `unsafe` by ActorNightly on Friday August 04, 2023 @02:54PM (#37004225)
Yeah this doesn't play out in real world.

Look at any large enterprise Java project. People take shortcuts and break things all the time, even with fairly strict typing and memory safety.

Of course you can enforce things like "no unsafes ever in codebase" on a project, but if you have to reply on guidance for development, then you can simply say "first we write a complete set of tests that are a contract on correct operation, then we develop code", at which point the language choice becomes irrelevant.

Re:Why Rust helps even if you have to use a lot of `unsafe` by DrMeepster on Saturday August 05, 2023 @09:09PM (#37017941)
Banning unsafe is actually really easy. Just one line `#![forbid(unsafe_code)]` at the start of your code.