logoalt Hacker News

dmitrygrtoday at 2:53 AM1 replyview on HN

Do you not use restrict in your normal everyday C code that you write? I use it in my normal C code.


Replies

kouteiheikatoday at 4:54 AM

I used to use it, but very rarely, since it's instant UB if you get it wrong. In tiny codebases which you can hold in your head it's probably practical to sprinkle it everywhere, but in anything bigger it's quite risky.

Nevertheless, I don't write normal everyday C code anymore since Rust has pretty much made it completely obsolete for the type of software I write.