3 ms·
The thing is that it's not always possible to scope unsafety to unsafe blocks. The example of vec in the post above isn't about haphazard unsafe code, it's abo
by Manishearth 11y ago
The thing is that it's not always possible to scope unsafety to unsafe blocks. The example of vec in the post above isn't about haphazard unsafe code, it's about code within Vec's module boundary being able to mess up invariants without needing to use unsafe.
This could be fixed with things like "unsafe fields" and "unsafe types", but IMO that's not really necessary.