News for hackers. Stuff that matters.
Re:Several core problems with Rust by Maxatar on Sunday November 23, 2025 @09:33PM (#46029751)
That Rust produced a predictable and deterministic way of failing, while in C++ the equivalent code of accessing an uninitialized value without verifying it beforehand would have resulted in entirely unpredictable behavior whose reach is entirely unbounded.
Re:Several core problems with Rust by ModernMech on Sunday November 23, 2025 @10:13PM (#46029965)
Moreover, now they realize this is an issue for them, they can just do "Ctrl+F unwrap" and fix each instance. Then they can put a hook on their commits that automatically flag any code with "unwrap". In some languages where you're allowed to just ignore errors, you could fix the proximal bug, but you'd never be sure you weren't causing or ignoring more of the same in the future -- how do you search for what isn't there?
Re:Several core problems with Rust by hyghjiyhu on Monday November 24, 2025 @01:39AM (#46031037)
Due to the unfortunate naming of unwrap_or and friends it's a little (but only a little) more complicated than ctrl-f.
Re:Several core problems with Rust by phi-go on Monday November 24, 2025 @02:04AM (#46031174)
You can also forbid unwraps as part of clippy.
Re:Several core problems with Rust by ChristianJacobs on Monday November 24, 2025 @02:20AM (#46031255)
Not really. It's just "unwrap(" instead.