4 ms·
> The uutils rewrite of yes into rust doesn't use unsafe Yes it does, it uses 'stdout.write_all', which ultimately uses unsafe to call libc.write https://gith
by TheDong 1y ago
> The uutils rewrite of yes into rust doesn't use unsafe
Yes it does, it uses 'stdout.write_all', which ultimately uses unsafe to call libc.write
https://github.com/rust-lang/rust/blob/d76fe154029e03aeb64af721beafdcef856d576a/library/std/src/sys/fd/unix.rs#L325-L326 https://github.com/rust-lang/rust/blob/d76fe154029e03aeb64af...
The "unsafe" in uutils is just better hidden.
I personally like my lack-of-safety where I can see it, which is why I find it much more relaxing to drive a car when the engine is already on fire, rather than one where I can't see any visible flames.