News for hackers. Stuff that matters.
Re:Comparative unsafety by boardwaalk on Friday April 09, 2021 @02:19PM (#26754026)
If your reaction to Rust actually following the prototype of chmod but not accepting conversions signed/unsigned silently is to redefine chmod so you can do it like you’d do in C… that seems a little bullheaded to me. Wrapping a C function is dangerous in a literal and real sense, doing “-1 as u32” is not at all.
Re:Comparative unsafety by thaumasiotes on Saturday April 10, 2021 @01:27AM (#26759156)
> If your reaction to Rust actually following the prototype of chmod but not accepting conversions

Eh... as the article points out, the chown documentation specifically says that you are expected to provide negative numbers. The spec is obviously bugged.

This limits the amount of righteousness you can claim over "but we followed the spec (that we knew was wrong)!"