Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Fil-C capabilities have a read only bit of this purpose.


Interesting, so you really can enforce constness on references? Does that mean the above code will crash on Fil-C?


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.


> 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.


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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: