And C++ is used in so many places on top of that. Every web browser is written in C++. Most GUI systems are written in C++ (or Objective C). All gaming engines are written in C++, etc.
The comparison to C++ with respect to exceptions is a bit misrepresented. In platforms where size/perf matters they are turned off at the compiler level(along with RTTI). This was always the first thing we did in gamedev right after turning on W4.<p>Overall decent article though.
Immediately thought of this <a href="https://pastebin.com/UAQaWuWG" rel="nofollow">https://pastebin.com/UAQaWuWG</a> and the accompanying discussion <a href="https://news.ycombinator.com/item?id=12312623" rel="nofollow">https://news.ycombinator.com/item?id=12312623</a>
Isn't a big part of its allure that it is "close to the metal"? When learning assembly language programming in the '80s, I would write a bit of C, and compile to assembly. It was very easy to mentally map from the one to the other.
Still, the thing is, I really don't buy into any arguments in favor of starting a new project, in C, <i>today</i>. The problem is that C suffers from some really serious disadvantages as a systems programming language, and it has no significant advantages over C++ or Rust, apart from subjective ideas like "it's simpler" or circumstantial issues like "my team doesn't know C++".<p>Firstly, apart from a simple call stack, C has no automatic resource management. There are no automatic destructors. Thus it is <i>too</i> easy to forget to free some memory or unlock a mutex or decrement a ref count or whatever, especially when many code paths are possible after a resource has been allocated. The other options are to use the "goto cleanup" or "goto err" idiom, which is still way more error prone than automatic destructors.<p>And secondly, despite being touted as so "efficient", C offers no way to write code that is both generic <i>and</i> free of runtime overhead, apart from preprocessor macros (which are filled with their own issues), or automatic code generation scripts. Both C++ and Rust have metaprogramming facilities which provide the ability to write generic code without sacrificing performance or maintainability.<p>I mean, with C++, the automatic deterministic allocation/destruction <i>alone</i> is worth using it over C. And all of the downsides (larger binaries, etc.) can be overcome without much effort. I concede that the extra language complexity of C++ over C could be a disadvantage, but in my mind that doesn't outweigh the benefits.
Hello,<p>I wrote an article about the other side of the coin, the problems I have with a world powered by C.<p><a href="https://www.linkedin.com/pulse/c-must-retire-sinan-akpolat?published=t" rel="nofollow">https://www.linkedin.com/pulse/c-must-retire-sinan-akpolat?p...</a><p>I don't want to compare C to another language. I just think that C is old.
C and C++ are in use <i>but</i> it has become easier than ever to bridge in higher-level languages. It is also hard to code sanely on a large project without a higher-level language.<p>Not every line of a program must be ultra-fast, and maintainability is still huge. If you are <i>not</i> offloading the less-critical parts of your project to languages that are easier to program in than C++, you are doing it wrong.
It would have been a nice article but there's just too much ridiculous hype in it.<p>I'm not saying C is a shitty language or anything, but the reality is that the only reason why C is still around is the long history it has and the dominant position it used to have.
I've noticed a lot of open source projects that likely would've been written in C ~5 years ago (like databases) are now being written in Golang. Stuff like Caddy, Kubernetes, InfluxDB, etc.