←back to thread

The provenance memory model for C

(gustedt.wordpress.com)
224 points HexDecOctBin | 1 comments | | HN request time: 0s | source
Show context
jvanderbot ◴[] No.44422693[source]
I love Rust, but I miss C. If C can be updated to make it generally socially acceptable for new projects, I'd happily go back for some decent subset of things I do. However, there's a lot of anxiety and even angst around using C in production code.
replies(6): >>44422779 #>>44423128 #>>44423371 #>>44423771 #>>44425323 #>>44433479 #
modeless ◴[] No.44423771[source]
Fil-C is a modified version of Clang that makes C and C++ memory safe. It supports things you wouldn't expect to work like signal handling or setjmp/longjmp. It can compile real C projects like SQLite and OpenSSL with minimal to no changes, today. https://github.com/pizlonator/llvm-project-deluge/blob/delug...
replies(1): >>44427476 #
tialaramex ◴[] No.44427476[source]
Fil-C does seem like a quicker route if your existing idea was something like "rewrite it in Java" and it exists today whereas both C and C++ have only vague ambitions to deliver some future language which might meet your needs.

I will be very surprised if there's widespread adoption of Fil-C for many new projects though.

replies(1): >>44430422 #
1. cryptonector ◴[] No.44430422[source]
A big stumbling block is that Fil-C requires all C in the program to be built with Fil-C, including all libraries. That means that Debian and such would need to either adopt Fil-C (perhaps for some distros) or ship Fil-C and non-Fil-C libraries for all pkgs with libraries. The alternative is that you have to build everything yourself, and this gets painful if you need to support ELFs/DLLs.