Comment

Comment by deng

> In fact, for many applications malfunctioning is better than crashing — particulary in the embedded world where Rust wants to be present.

Not a fact. Particularly in the embedded world, crashing is preferable to malfunctioning, as many embedded devices control things that might hurt people, directly or indirectly.

> If a pacemaker stops — telling a victim “but the memory was not corrupted in the crash” is a weak consolation.

If a pacemaker suddenly starts firing at 200Hz, telling a victim "but at least it didn't crash" is a weak consolation. A stopping pacemaker is almost always preferable to a malfunctioning one, as most people with pacemakers still have sufficient natural rhythm to survive this for long enough to get help.

> We actually had a recent Cloudflare outage caused by a crash on unwrap() function

Please read the whole article. If the unwrap hadn't caused an exit, the process would've run out of memory, leading to a much less deterministic behavior which is much harder to diagnose and fix. I always prefer an early exit with a clear error instead of getting killed by the OOM reaper.

parent deng 11 months ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton