Hacker News new | ask | show | jobs
by TheDong 394 days 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/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.