This entire article seems to amount to "I am used to C, thus I don't see the problem with C." which is a fine position to have, but it's a perspective unique to the writer and others like him. It doesn't apply to people learning new languages that aren't C.<p>Also several statements about how C must be used because somehow it's closer to the real world/hardware than other languages. Which is easily shown to be false given that hardware designers have had bend backwards and into contorted shapes to emulate the hardware environment that C was originally created to work against. This great article is a nice rebuttal of that: C Is Not a Low-level Language: Your computer is not a fast PDP-11. <a href="https://queue.acm.org/detail.cfm?id=3212479" rel="nofollow">https://queue.acm.org/detail.cfm?id=3212479</a><p>These types of arguments feel like they come from people who don't realize how much the compiler reworks your code to make it act like it does what you told it to do.
The primary benefit to C is that it is simple. And that is IMO the reason why it has such sticking power. The entire language & toolchain is understandable at a fairly core level without too much effort.<p>Please don’t start a C flame war either HN. I know I’m nerd sniping you all on this one
I love C. It's what I learned after learning MASM style Intel assembly.<p>I have a project still at the planning stage. I have many Rust crates lined up. So far I really like the bits of Rust I have learned. C plus generics? Sign me up! But damn, after coming from really awesome IDEs like Visual Studio, it just seems like it's taking me forever to make progress.<p>Right now I'm asking myself, does Rust save me time in the long run from chasing down bugs? I'm not really sure, because I think I'm already decent at avoiding C foot guns.
I hated learning/using C. Once I was introduced to C++, it was like a breath of fresh air. Sure, at lot of it stylistic in nature. But those frameworks matter. They really do.
Null was a trillion dollar mistake.<p>Pointers and pointer math were a 10 billion dollar mistake.<p>Unchecked array access is a several billion dollar mistake.<p>Goto has its place: consolidated resource error unwind cleanup. That's basically its only valid use except for mechanically-generated finite state machines. Beyond that, don't bother. Other programming languages use reference counting and lifetimes to manage resources.<p><pre><code> int
foo() {
void *b0 = malloc(1000);
if (!b0) goto err0;
/* do something */
void *b1 = malloc(1000);
if (!b1) goto err1;
/* do something else */
void *b2 = malloc(1000);
if (!b2) goto err1;
/* keep going */
/* ... */
free(b2);
free(b1);
free(b0);
return 0;
err3:
free(b2);
err2:
free(b1);
err1:
free(b0);
err0:
return 1;
}</code></pre>
Like others were made for JavaScript and PHP.<p>Had it not been for UNIX freebie, it would had been a footnote like so many others.<p>Outside UNIX clones and the few surviving embedded workloads without alternative, there is hardly a reason to reach for it instead of C++, which is also a UNIX child.