3 ms·
Fil-C capabilities have a read only bit of this purpose.
by pizlonator 1y ago
Fil-C capabilities have a read only bit of this purpose.
- kragen 1y agoInteresting, so you really can enforce constness on references? Does that mean the above code will crash on Fil-C?
- mbrock 1y agoI tried it and it doesn't crash when compiled with Fil-C, FYI. But I guess it wouldn't be too hard to implement.
- pizlonator 1y agoJust 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.
- jacquesm 1y ago> 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.