▲ | maxdamantus 3 days ago | |||||||
> This is, of course, exactly what Rust does: I am not aware of a single thing that &str allows you to do that you cannot do with &[u8], except things that do require you to assume it's valid UTF-8. Doesn't this demonstrate my point? If you can do everything with &[u8], what's the point in validating UTF-8? It's just a less universal string type, and your program wastes CPU cycles doing unnecessary validation. | ||||||||
▲ | matt_kantor 3 days ago | parent [-] | |||||||
> except things that do require you to assume it's valid UTF-8 That's the point. | ||||||||
|