TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

After All These Years, the World Is Still Powered by C Programming

81 pointsby geospeckabout 8 years ago

12 comments

TwoBitabout 8 years ago
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.
评论 #14015155 未加载
vvandersabout 8 years ago
The comparison to C++ with respect to exceptions is a bit misrepresented. In platforms where size&#x2F;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.
EvanAndersonabout 8 years ago
Immediately thought of this <a href="https:&#x2F;&#x2F;pastebin.com&#x2F;UAQaWuWG" rel="nofollow">https:&#x2F;&#x2F;pastebin.com&#x2F;UAQaWuWG</a> and the accompanying discussion <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=12312623" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=12312623</a>
intrasightabout 8 years ago
Isn&#x27;t a big part of its allure that it is &quot;close to the metal&quot;? When learning assembly language programming in the &#x27;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.
评论 #14015520 未加载
charles-salviaabout 8 years ago
Still, the thing is, I really don&#x27;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 &quot;it&#x27;s simpler&quot; or circumstantial issues like &quot;my team doesn&#x27;t know C++&quot;.<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 &quot;goto cleanup&quot; or &quot;goto err&quot; idiom, which is still way more error prone than automatic destructors.<p>And secondly, despite being touted as so &quot;efficient&quot;, 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&#x2F;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&#x27;t outweigh the benefits.
评论 #14015095 未加载
评论 #14018116 未加载
aciliketcapabout 8 years ago
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:&#x2F;&#x2F;www.linkedin.com&#x2F;pulse&#x2F;c-must-retire-sinan-akpolat?published=t" rel="nofollow">https:&#x2F;&#x2F;www.linkedin.com&#x2F;pulse&#x2F;c-must-retire-sinan-akpolat?p...</a><p>I don&#x27;t want to compare C to another language. I just think that C is old.
recursiveabout 8 years ago
cowardlydragon, your comment is marked [dead], so most won&#x27;t see it. That&#x27;s unfortunate because it&#x27;s pretty good.
评论 #14014866 未加载
评论 #14014886 未加载
makecheckabout 8 years ago
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.
illuminati1911about 8 years ago
It would have been a nice article but there&#x27;s just too much ridiculous hype in it.<p>I&#x27;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.
评论 #14014965 未加载
评论 #14015027 未加载
评论 #14017299 未加载
j45about 8 years ago
With the arrival of WebAssembly this might see another boost.
评论 #14018141 未加载
ben_jonesabout 8 years ago
I&#x27;ve noticed a lot of open source projects that likely would&#x27;ve been written in C ~5 years ago (like databases) are now being written in Golang. Stuff like Caddy, Kubernetes, InfluxDB, etc.
评论 #14018724 未加载
socmagabout 8 years ago
Good!<p>It&#x27;s really awesome