5 ms·
They're discussing the move to C99. Not sure that counts as modern C at this point.
by LAC-Tech 5y ago
They're discussing the move to C99. Not sure that counts as modern C at this point.
- flyingfences 5y agoThey're discussing a move to C11, which counts in my book.
- LAC-Tech 5y agoyeah fair enough should've read the rest of the article before my snide comment
- tombert 5y agoI haven't touched C in any serious capacity in quite awhile; how often does C get new revisions, because isn't C11 still more than a decade old? I understand why the linux kernel folks aren't moving to the bleeding edge (Linux is old, you have to do these ports incrementally), but I'm curious why the pace of language is so slow. I guess it's because C has more or less stabilized and thus further revisions are less necessary?
- LukeShu 5y ago> how often does C get new revisions 1989, 1995, 1999, 2011, 2017. The 1995 one was an "amendment", not a full revision (and is mostly additions to libc, which Linux doesn't get to use; the only language change is the addition of digraphs). C17 was a "bugfix" revision; compilers will have applied these fixes to their C11 implementations, so in effect the only difference between C11 and C17 is the value of __STDC_VERSION__. So for most intents and purposes C11 is still the most recent revision.
- dahfizz 5y ago> but I'm curious why the pace of language is so slow. I guess it's because C has more or less stabilized and thus further revisions are less necessary? That is a big part of it. C is an old, stable, complete language. There is also the existence of gnu extensions, which bridge the gap between language revisions. For example, anonymous unions were added in C11 but they have been a gnu extension since forever.
- syncsynchalt 5y ago> I'm curious why the pace of language is so slow This is a strength of the language. If you've ever done CI/CD for a large project in a fluid development ecosystem (e.g. nodeJS), you can understand why it might be refreshing to develop your operating system in a language where standards are measured by the decade.
- clhodapp 5y agoGiven that C99 is much closer in vintage to their current C89 than it is to today's date and also just straight up really old, it does seem inappropriate to distinguish that as "modern C". That said they do seem to be discussing both C99 and C11 so it does seem like going with something that would qualify as modern (especially in light of Linux's need to be conservative) is actually on the table.
- dahfizz 5y agoYou also have to look at the contents of the revisions. C99 was a massive update for C, and C11 was tiny in comparison (and C17 was basically nothing at all). Writing C89, without variable declaration in a for loop, and without // comments, etc, feels ancient. C99 on the other hand is what defines how C looks today. This is also why the attitude is: if they jump to c99, they may as well jump to c11 because they are basically the same.