4 ms·
Why not lift the encoding to the type system? The type system could remember which strings are ASCII and which are UTF-8. More generally, why not lift such proo
by lidHanteyk 6y ago
Why not lift the encoding to the type system? The type system could remember which strings are ASCII and which are UTF-8. More generally, why not lift such proofs to types?
- majewsky 6y agoThat's exactly the difference between [u8] and str. The unsafety here arises from skipping the standard proof over a more domain-specific one.