> C lost this battle a long time ago... The number of domains where one must use C is shrinking
I doubt that. Kernels, drivers, embedded devices (not IoT), GNU world, are all highly C oriented. Want to develop for a customer with unknown unix variant? Want to develop a tool everyone are going to use, either on Linux/BSD/Solaris? C is the only option.
> but it's much easier to write correct code in C++ and it will be just as fast
Writing correct and fast C++ code at the same time was never an option; even today, with "safe" pointers, people are still confused how to correctly use shared_ptr<>.
> now that we also have Go and Rust this will accelerate
Some places where C is still a strong contender:
* good tooling - debuggers, memory leak detectors, years of experience with compilers on various platforms
* well understood language - C has dark corners and they are documented well
* interfacing with everything else - from devices to libraries and languages
Rust can piggyback on almost any C tooling (emits DWARF debug info), and has very strong C interoperability, if C can talk to it, rust probably can too.
I doubt that. Kernels, drivers, embedded devices (not IoT), GNU world, are all highly C oriented. Want to develop for a customer with unknown unix variant? Want to develop a tool everyone are going to use, either on Linux/BSD/Solaris? C is the only option.
> but it's much easier to write correct code in C++ and it will be just as fast
Writing correct and fast C++ code at the same time was never an option; even today, with "safe" pointers, people are still confused how to correctly use shared_ptr<>.
> now that we also have Go and Rust this will accelerate
Some places where C is still a strong contender:
* good tooling - debuggers, memory leak detectors, years of experience with compilers on various platforms
* well understood language - C has dark corners and they are documented well
* interfacing with everything else - from devices to libraries and languages