News for hackers. Stuff that matters.
Re:Rusty Ownership and the Lifecycle’s Stone by MuffinFlavored on Sunday November 27, 2022 @05:55PM (#33767883)
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.

There are no comments on this comment yet.