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

Conversions that create copies are always explicit in Rust (unless it's a copy type, which strings aren't). Conversion between the string types is at minimum taking the borrow of it and then taking a copy of the borrow is once again explicit. You can also cheaply use a CoW wrapper to get a no-copy string passed around into plenty of places.

The point is, with rust you have more options to enforce no-copy through the type system.



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

Search: