5 ms·
1990 C90 2000 C99 2011 C11 so, if this is the trend expect a new C standard in 2022.
by program 14y ago
1990 C90
2000 C99
2011 C11
so, if this is the trend expect a new C standard in 2022.
- shin_lao 14y agoC/C++ is used to build the fundation of pretty much everything you use every day. I don't think a fast moving standard would be a good thing.
- derleth 14y ago> C/C++ This is specifically about the C programming language. Can we not conflate it with a different language entirely, at least in this comment thread?
- Retric 14y agoI was under the impression the C++ standard moves in lockstep with C so that all valid C programs should also be valid C++ programs.
- adrianN 14y agoI believe that has not been true for a long time, at the very least because some things are keywords in C++ that would be valid identifiers in C.
- Retric 14y agoYea, after looking into it they don't seem to be completely compatible anymore. I have known many people to use a C++ compiler when writing C code, but it looks like that restricts you to a subset of C. They do try and stay reasonably consistent so for example Long Long moved from C to C++. And C99 has reduced some other incompatibilities by incorporating C++ features such as // comments and mixed declarations and code. http://en.wikipedia.org/wiki/Compatibility_of_C_and_C%2B%2B http://en.wikipedia.org/wiki/Compatibility_of_C_and_C%2B%2B
- Someone 14y ago"I have known many people to use a C++ compiler when writing C code, but it looks like that restricts you to a subset of C." Many C++ compilers actually are C/C++ compilers that decide what language to compile depending on command line flags and/or file name extension.
- Retric 14y agoAhh, ok now that explains a lot, thanks.
- natesm 14y agoThat's Objective-C. int* foo = malloc(sizeof(int)); Is invalid C++.
- chimeracoder 14y agoI don't really know C++ as well as I know C - could you explain? I always thought that the only real reason C++ wasn't a superset is because of the additional keywords.
- wollw 14y agoC++ doesn't coerce the void* malloc returns into an int* , C does. You have to write int* foo = (int*)malloc(sizeof(int)); in C++ or the compiler gives a type error.
- pwaring 14y agoA fast moving standard is not necessarily a bad thing, provided that changes don't break backwards compatibility. In some ways, I'd like the C standard to move a bit faster, to keep up with things like multi-threading (although there's an argument to be had over whether that should be defined as part of the language or left to vendor-specific libraries).
- angersock 14y agoAaaaand that's why they've added these ops. Note that it took a while (> decade) to really find out that these features were reasonable to assume support for. :)
- chimeracoder 14y ago> A fast moving standard is not necessarily a bad thing, provided that changes don't break backwards compatibility. Another problem is that the standard becomes irrelevant. This is a concern for HTML5, because a 'rapidly evolving' standard means that things can be added prematurely - but once something is in the standard, it can't be removed (easily). At some point, you run the risk of having more companies go the Microsoft route and just abandon the standard altogether, and either stick with an older version, or just fork it into their own new language.
- twsted 14y agoNo, 2023
- pjmlp 14y agoTrue, but new standards don't mean that they get support in all compilers. http://en.wikipedia.org/wiki/C99 http://en.wikipedia.org/wiki/C99 http://en.wikipedia.org/wiki/C11_%28C_standard_revision%29 http://en.wikipedia.org/wiki/C11_%28C_standard_revision%29 Microsoft as typical bad boy attitude already said it only cares about C89, as everything else can be done with C++ anyway. And as they don't care about portability this is unlikely to change, unless they are pressured to change like it happened with IE.
- ExpiredLink 14y agoNobody is obliged to implement a new standard. C90 is a Standard, C99 is another one. 'Newer is better' is a fallacy. SQL 92 Intermediate Level e.g. is the most important SQL Standard.
- pjmlp 14y agoTrue. Do you know if SQL 92 is finally fully supported across DB servers? This was a nightmare back in the early 90's.
- ExpiredLink 14y agoAt least SQL 92 is the 'common denominator' among current relevant RDBMS.
- yuhong 14y agoTo be honest, C99 is not a true subset of C++.