3 ms·
The difference between a language extension, and a new language, is one of degree, not kind. Personally, since the semantics of this "extension" go to the core
by scott_s 10y ago
The difference between a language extension, and a new language, is one of degree, not kind. Personally, since the semantics of this "extension" go to the core of what one does in C, I consider Checked C a new language.
- Jtsummers 10y agoI agree, in principle. But reading over this document, the changes can be made in an incremental fashion. And with far less impact than switching to using C++ just for these (assuming equivalents exist) features.
- gpderetta 10y agoswitching to c++ can also be done in an incremental fashion.
- Jtsummers 10y agoYes, but not quite as trivially as: Enable extension Add `checked` to array declarations. (for the simplest case they've implemented). Converting to C++ also means making sure you have `extern "C"` in your function declarations to get around C++'s name mangling when calling C libraries. Among other, potential, source level changes. Or, similarly, making sure your C (now C++) library can be called correctly by C projects that depended on it. I'm not sold on this project as we haven't seen any results of course, but the approach is simpler than switching to C++.
- nitrogen 10y agoThere are also some nice C99 syntax features like compound literals that may not be supported by your C++ compiler.
- choosername 10y agosince many C programs will have simple array types like that, this addition is mostly syntactic.