Hacker News new | past | comments | ask | show | jobs | submit login

There are only 2 outcomes for Rust not having unsafe blocks:

1. Everything would be unsafe. Same as C/ C++

2. You could not use it to write real software, because not all constructs are expressible in safe code. The std lib requires unsafe to a bigger extend. Talking to the OS does the same.

Unsafe blocks are required to write software. And they are good, because they minimize the amount of code which can not be automatically audited by the compiler.

Unfortunately unsafe blocks seem to get more and more misused as a metric around the quality of software. Which is certainly not their intention.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: