# Fil-C

160 Hacker News commenters recommended Fil-C and 60 criticized it, November 2025 to November 2026. It was recommended in 13 of 13 months. It meets the Hacker Approved badge rule.

**Verdict:** Recompiles existing C and C++ code with strong memory safety and high compatibility, making legacy software safer without a rewrite, at the cost of speed, memory and garbage collection.

## Why people recommend it

- Memory-safe recompile of legacy code (8 comments): "sudo compiled with Fil-C: uses pam compiled with Fil-C, and all of pam's dependencies are compiled with Fil-C, so the whole thing is memory safe." ([source](https://news.ycombinator.com/item?id=46091289)) "Choosing to use Fil-C to recompile existing (established, stabilized, functional...) software rather than rewrite it is an engineering choice." ([source](https://news.ycombinator.com/item?id=45790977)) "Fil-C makes a lot of sense to me if the goal is to simply take existing legacy software and recompile it in a more memory safe way" ([source](https://news.ycombinator.com/item?id=46095005))
- High compatibility with existing C/C++ (5 comments): "what I like is that it works with existing C++ code; I don't think the extra safety relative to Rust is worth the performance penalty" ([source](https://news.ycombinator.com/item?id=49054926)) "The main advantage of Fil-C is compatibility with C, in a secure way. The disadvantages are speed, and garbage collection." ([source](https://news.ycombinator.com/item?id=45789134)) "it has stronger memory safety guarantees than rust, none of the compatibility issues that a wholesale rewrite has" ([source](https://news.ycombinator.com/item?id=49708879))
- Turns memory bugs into safe crashes (5 comments): "Caught multiple memory safety issues in a nice deterministic way, so designing the object model was easier than it would have been otherwise." ([source](https://news.ycombinator.com/item?id=47844128)) "There is now an iron clad defense against all memory safety bugs leading to RCE that is actually practical to use in production in many cases" ([source](https://news.ycombinator.com/item?id=50183947)) "This improves the situation greatly by converting most interesting cases of unsound behavior into runtime errors." ([source](https://news.ycombinator.com/item?id=50083652))
- Stronger guarantees than Rust (3 comments): "In Fil-C, no such specialists are needed, and the pool of unsafety is closed and fixed, no matter what programs, algorithms, data structures you use." ([source](https://news.ycombinator.com/item?id=49047842)) "Those languages rely on a much larger pile of YOLO C/C++ code for their runtimes and standard libraries than Fil-C does." ([source](https://news.ycombinator.com/item?id=49042736)) "it has stronger memory safety guarantees than rust, none of the compatibility issues that a wholesale rewrite has" ([source](https://news.ycombinator.com/item?id=49708879))

## What people warn about

- Significant performance and memory overhead (6 comments): "Tools like Fil-C, hardened mallocs like SlimGuard, and other "make C safe" solutions all sacrifice absurd amounts of performance" ([source](https://news.ycombinator.com/item?id=49056188)) "The performance drop of Fil-C (as described in the article) limits the usage, and the GC (independently) limits the usage." ([source](https://news.ycombinator.com/item?id=45847549)) "Not everyone wants to recompile the whole app and dependencies with filc to get a slowdown, extra memory use and safety." ([source](https://news.ycombinator.com/item?id=46279802))
- Garbage collection unwanted by some (4 comments): "Sure, GC's are nice which is why so many langs have them, but that removes the deterministic allocation performance which most C/C++ programmers want" ([source](https://news.ycombinator.com/item?id=49046650)) "The main advantage of Fil-C is compatibility with C, in a secure way. The disadvantages are speed, and garbage collection." ([source](https://news.ycombinator.com/item?id=45789134)) "for this to work, tracing GC can not be used. And this is what prevents Fil-C and many other languages to be used in that area." ([source](https://news.ycombinator.com/item?id=45844529))
- Not a full drop-in C replacement (4 comments): "I don't think fil-c is a drop in C replacement, there are things you can do in C such as certain types of pointer abuse that fil-c prohibits" ([source](https://news.ycombinator.com/item?id=47842747)) "As far as I understand, Fil-C changes the ABI of the system, therefore it requires a new architecture in Debian terminology" ([source](https://news.ycombinator.com/item?id=45789542)) "I can write the networking parts in Rust and the rest of the program in C, but apparently can't do the same with Fil-C." ([source](https://news.ycombinator.com/item?id=45796401))
- Leaves some bug classes uncovered (4 comments): "Fil-C takes one particular class of allocation related bugs and UB off the table, but leaves many of them behind." ([source](https://news.ycombinator.com/item?id=49674478)) "the comparison becomes a bit apples vs pears when bragging about how much more memory-safe Fil-C is than Rust" ([source](https://news.ycombinator.com/item?id=49045347)) "optimization passes are still able to do things that wouldn't be possible without UB, like falling through functions and deleting safety checks inserted by the Fil-C runtime" ([source](https://news.ycombinator.com/item?id=50238301))

## Alternatives hackers recommend

- [Claude's C Compiler](https://hackerapproved.com/p/claude-s-c-compiler.md): 39 recommend
- [Visual C++](https://hackerapproved.com/p/visual-c-plus-plus.md): 29 recommend
- [Tiny C Compiler (TCC)](https://hackerapproved.com/p/tcc.md): 22 recommend
- [Microsoft Visual C++ compiler (MSVC)](https://hackerapproved.com/p/msvc.md): 20 recommend
- [Tiny C Compiler](https://hackerapproved.com/p/tiny-c-compiler.md): 20 recommend

## Cite as

Hacker Approved, "Fil-C", https://hackerapproved.com/p/fil-c/ (counts from 1,795,640 Hacker News comments, November 2025 to November 2026).
