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

Having to clone a String every time you send it around is “confusing” if you come from a C char* pointer background.

You can dereference it to &str but I’m pretty sure that introduces weird “lifetime” &’a or whatever errors in most places (when you are first learning to write Rust that is)

same for structs, I typically just derive Clone. Kind of gross but for hobbyist projects where I want to “move fast” (coming from node.js so it’s hard to not treat Rust like a “scripting” language), it suffices.



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

Search: