Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I don't see the difference here. D offers the same options when processing a string.


That's surely the whole point, every D std.string function is also a string decoder with varying features. But a suitably decoded "string" is still just the same type, whereas Rust has a distinct type for actual UTF8 strings


I think the point is that you run the unicode validation once on your [u8] array, which gives you a &str (or String for the lossy variants). From then on, you know you have valid unicode and don't need to keep checking.




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

Search: