News for hackers. Stuff that matters.
Re:Zig Creator Calls Spade a Spade, Anthropic Blows Smoke by marshray on Monday July 13, 2026 @01:38PM (#48896096)
Well, only if Clone/Copy is compatible with the semantics of the API. I.e., the called function doesn't need to modify anything. No &mut params (or data members) except perhaps `&mut self` (which would refer to definitions the same file).

That's usually the case for Rust programs because the language encourages it. Are Zig programs like that?

Re:Zig Creator Calls Spade a Spade, Anthropic Blows Smoke by lunar_mycroft on Monday July 13, 2026 @02:16PM (#48896569)
To be fair, you can throw an Arc<Mutex<_>> or Rc<RefCell<_>> at it if you're starting from something that has multiple "mutable borrows", but that adds runtime cost and complexity.