News for hackers. Stuff that matters.
Re:Perhaps Rust Needs "Defer" by Traubenfuchs on Wednesday November 06, 2024 @06:59AM (#42060748)
If it's really fine, shouldn't the compiler optimize that if away?
Re:Perhaps Rust Needs "Defer" by lifthrasiir on Wednesday November 06, 2024 @07:12AM (#42060937)
Of course (there are several GCC attributes for that), but it is not really like that an additional check improves readability anyway.
Re:Perhaps Rust Needs "Defer" by cozzyd on Wednesday November 06, 2024 @09:07PM (#42072524)
It has different performance characteristics
Re:Perhaps Rust Needs "Defer" by kadoban on Thursday November 07, 2024 @08:18PM (#42083137)
Isn't that common with changes the optimizer does? What else is the point of it?