3 ms·
With C++, going modern-first is a great approach. But C hasn't really been modernized that much, and because Microsoft has been so slow to fully support even j
by cryptonector 7y ago
With C++, going modern-first is a great approach. But C hasn't really been modernized that much, and because Microsoft has been so slow to fully support even just C99, let alone C11 or any GCC/clang extensions, often one has to to stick to a subset of C99 anyways -- exactly as you surmised.
The problem with C is that it's extremely dangerous. Besides learning how to program in C, you'll really want to know how to use memory debuggers such as valgrind and Dr. Memory (https://www.drmemory.org/ https://www.drmemory.org/), as well as AFL for fuzzing, and various GCC and clang sanitizers. You'll really want to let functional programming language experience inform your approach to C API design and implementation.
- pjmlp 7y agoMicrosoft hasn't been slow, they have been quite clear, C is legacy on Windows, given its security implications, all new code should be C++ and the compiler is called Visual C++ after all. C support is done to the extent of ISO C++ requirements. For those that still want to use plain old C on Windows, they have contributed to clang, and it is now available as part of Visual Studio installer.