Hacker News new | ask | show | jobs
by MuffinFlavored 1298 days ago
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.