HeadlinesBriefing favicon HeadlinesBriefing.com

Memory Safety Absolutism: Rust vs Fil-C Debate

Hacker News •
×

Piotr Sarnacki examines the growing tension between Rust advocates and proponents of Fil-C, a new compilation mode that adds garbage collection and Invisi Caps to make C/C++ memory safe. Fil-C's author and Andrew Kelley (Zig's creator) criticize Rust as fundamentally unsafe due to its `unsafe` escape hatch, arguing only Fil-C-style approaches provide true memory safety.

Sarnacki counters that this absolutism ignores practical trade-offs: Fil-C introduces ABI incompatibility, garbage collection, and 2-3x performance penalties, making it unsuitable for many systems programs. Meanwhile, Android's 5M+ LOC of Rust shows just 0.2 vuln per 1M LOC versus ~1,000 memory safety vulnerabilities per MLOC historically for C/C++ — a 1000x reduction.

The author argues for pragmatism: projects that can accept Fil-C's trade-offs should adopt it, while others should use languages like Rust that eliminate most memory safety risks. Criticizing Rust while tolerating standard C/C++ reveals selective absolutism rather than genuine safety concerns.