logoalt Hacker News

jcalvinowenstoday at 3:29 AM0 repliesview on HN

Requiring C23 for a library header is a great way to guarantee nobody will use your code for long time.

I still write nearly ANSI compliant C for simple embedded things. Because somebody might need to figure out how to rebuild it in twenty years, and making that person's life harder for some syntactic sugar isn't worth it.

Even C99 can be a problem: for example, C99 designated initializers are not supported in C++. If your header needs to support C++ you can't use them (C++ forces you to initialize every field in the structure in order if you do it that way).