News for hackers. Stuff that matters.
Re:Fil-C: A memory-safe C implementation by kragen on Wednesday October 29, 2025 @03:18AM (#45743638)
Interesting, so you really can enforce constness on references? Does that mean the above code will crash on Fil-C?
Re:Fil-C: A memory-safe C implementation by mbrock on Wednesday October 29, 2025 @07:16AM (#45745290)
I tried it and it doesn't crash when compiled with Fil-C, FYI. But I guess it wouldn't be too hard to implement.
Re:Fil-C: A memory-safe C implementation by pizlonator on Wednesday October 29, 2025 @08:32AM (#45745990)
Just using const in C isn’t enough, since C’a const is unsound, so I ignore it.

But if you try to write to a readonly global constant then you’ll panic. And there are a handful of ways to allocate readonly data via Fil-C’s APIs.

Re:Fil-C: A memory-safe C implementation by jacquesm on Sunday November 02, 2025 @03:21PM (#45793070)
> Just using const in C isn’t enough, since C’a const is unsound, so I ignore it.

And now I have confused faces looking at me why I just laughed out loud.