3 ms·
>So there will of course be some unsafe. In a well implemented driver it will also be very limited in scope and relatively easy to check. I'm sure that is what
by pml1 6y ago
>So there will of course be some unsafe. In a well implemented driver it will also be very limited in scope and relatively easy to check.
I'm sure that is what the C developer thought as well...I'm not trying to be snarky, but that same arguments that are made against C code holds equally true for unsafe code...
I don't think it is a reasonable position to suggest that unsafe Rust code is somehow safer than C code...
- gpm 6y agoThe point isn't that unsafe rust code is safer than C code, but that there is many orders of magnitude less unsafe rust code than c code in a driver of the same size.
- teknopaul 6y agoUnsafe rust is safer than C for two reasons. You can limit what comes in from safe rust. Unsafe rust still has more compiler checks than C. Unsafe rust is not as permissive as C. Its rust still, with certain things permitted. Its unsafe{} not nosafe{}