Live data from Hacker News

Ask HN: Why do so many developers dislike C when I find it inspiring?

news.ycombinator.com

1–10 of 42 posts

Ask HN: Why do so many developers dislike C when I find it inspiring?

#1
I write in C, and I constantly see posts or comments calling it dangerous, outdated, or unnecessarily complex.

But for me, C feels like freedom.

I can build exactly what I want — small tools, secure utilities, no magic, no garbage collection, no telemetry.

Yes, I have to think harder about memory and safety. But that’s the point. I want to be close to the machine. I want to know what my code does, byte by byte.

Still, I find myself wondering:

Why do so many people seem to dislike C? Is it just because it doesn’t protect you from yourself? Or am I missing something that I’ll regret later?

I’d really appreciate honest thoughts — especially from those who moved away from C.

Thanks.

Re: Ask HN: Why do so many developers dislike C when I find it inspiring?

#2
For simple things I also like shell scripts. But for bigger more complex systems, especially with long life-times, many users and many developers, the sharp edges get too dangerous. In those case I move to Java or at least something with stronger typing, and less chance of memory management errors.

My last big project was 100kloc C/C++ in a radiator valve though. Not many languages with a run-time would have fit in the 32kB code space for that project.

Re: Ask HN: Why do so many developers dislike C when I find it inspiring?

#3
I don't trust you to get it right.

One of my formative experiences was typing in a terminal emulator for CP/M from a 1984 Byte magazine and porting it to OS-9 on my TRS-80 Color Computer. It was quite the trauma to see 80% of the code was error handling with the error-prone pattern of checking errno. When I saw Java which had try-catch I was so delighted.

"Feels like freedom" is one of the most dangerous feelings out that that reminds you that feelings are not facts. Wasn't it Orwell that coined the slogan "Freedom is slavery?"

Re: Ask HN: Why do so many developers dislike C when I find it inspiring?

#4
post #2

For simple things I also like shell scripts. But for bigger more complex systems, especially with long life-times, many users and many developers, the sharp edges get too dangerous. In those case I move to Java or at least something with stronger typing, and less chance of memory management errors. My last big project was 100kloc C/C++ in a radiator valve though. Not many languages with a run-time would have fit in t…

I think that's the beauty of C — it lets you fit logic into 32kB without screaming.

For me it's not about "modern safety" — it's about knowing that every byte is mine. But yeah, I get the tradeoff when you’ve got teams, timelines and a JVM.

Re: Ask HN: Why do so many developers dislike C when I find it inspiring?

#5

I don't trust you to get it right. One of my formative experiences was typing in a terminal emulator for CP/M from a 1984 Byte magazine and porting it to OS-9 on my TRS-80 Color Computer. It was quite the trauma to see 80% of the code was error handling with the error-prone pattern of checking errno. When I saw Java which had try-catch I was so delighted. "Feels like freedom" is one of the most dangerous feelings out…

Yeah, I agree — sometimes you can really run into that and spend a lot of time handling errors.

Java is also a great language. I get why it clicked for you.

Re: Ask HN: Why do so many developers dislike C when I find it inspiring?

#6

I don't trust you to get it right. One of my formative experiences was typing in a terminal emulator for CP/M from a 1984 Byte magazine and porting it to OS-9 on my TRS-80 Color Computer. It was quite the trauma to see 80% of the code was error handling with the error-prone pattern of checking errno. When I saw Java which had try-catch I was so delighted. "Feels like freedom" is one of the most dangerous feelings out…

I want to amplify this. It isn't just that we don't trust you personally or something at your current level of development. It is that we have seen all the smartest people use C, augment it with all manner of static analysis tools, develop endless "technically this is a C dialect and not C" practices like making bespoke rules about how and when to allocate and how to deal with recursion...

... and they still write programs blasted full of security holes and bugs that would be prevented in any other language. (Other that C++.)

Not that other languages are perfect or anything. But we've got decades of proof that C is full of sharp edges and that no, you (and this time I do mean you personally) aren't avoiding them. You just haven't noticed the bleeding yet... and the odds are good it's actually your users that will pay.

I consider greenfielding in C without the absolute best in static analysis backing you up to be professional malpractice. If you're not acting as a professional than that doesn't apply. But no professional should be doing that in 2025. And I consider "C backed with the absolute best static analysis" to still be something you need to be backed into, against your will, because of something very compelling for your project.

Also, the type system is bad, it lacks good closures, it can't abstract worth a toot, by 2025 it is legitimately a bad language despite all the attempted fixes over the decades. And I'm not a "use Haskell for everything" sort of guy... but C is just way, way too deep into the "costs" on the cost/benefits equation. It was a great language for the time, but we did not reach the epitome of programming perfection in the 1970s. I doubt we've reached it even now. Nobody should be reaching for C routinely now.

I advise spending some time learning Rust. I'm not saying that as a crazed Rust advocate... my actual experience with the language is limited to "I compiled Hello World once". But the borrow teacher will teach you a lot of important things about how to think about memory management. Then you will go back to C, and with a couple of hours you'll find yourself appalled. The resulting clarity you will see C with is completely accurate, and while you can get it from other places, Rust is a very efficient teacher of the problems I'm referencing here. In 2025 C is truly an appalling language.

Re: Ask HN: Why do so many developers dislike C when I find it inspiring?

#7
I'm an old scientist that did lots of computer simulations that ate up many many cpu cycles. I started with BASIC in the 70s, then learned machine language, and used Fortran throughout the 80s. My simulation programs ran for 24 hours or more. Once I learned C, the concepts of structures and pointers were tremendously useful for storing and passing information. I don't believe any other language could be as efficient when program run times are measured in hours.

Re: Ask HN: Why do so many developers dislike C when I find it inspiring?

#8
post #6

I don't trust you to get it right. One of my formative experiences was typing in a terminal emulator for CP/M from a 1984 Byte magazine and porting it to OS-9 on my TRS-80 Color Computer. It was quite the trauma to see 80% of the code was error handling with the error-prone pattern of checking errno. When I saw Java which had try-catch I was so delighted. "Feels like freedom" is one of the most dangerous feelings out…

I want to amplify this. It isn't just that we don't trust you personally or something at your current level of development. It is that we have seen all the smartest people use C, augment it with all manner of static analysis tools, develop endless "technically this is a C dialect and not C" practices like making bespoke rules about how and when to allocate and how to deal with recursion... ... and they still write pr…

I truly appreciate the depth of your response. I can see that it comes from long experience and serious thought.

I don’t claim to be immune to the sharp edges of C. I’ve already cut myself more than once. Maybe I’m bleeding now and don’t even know it yet.

But there’s something in me that still wants that control — even if it hurts. I’m not building for clients or large teams. I’m building for myself with intention.

Maybe I’ll shift later. Maybe I’ll come to hate C myself. But for now, every time I compile a C binary and see it run exactly as I built it — without layers, runtimes, or abstractions — I feel like I’m touching something real.

I’ll take a look at Rust. Not to escape C — but to understand memory from a different angle.

Thanks for your honesty.

Re: Ask HN: Why do so many developers dislike C when I find it inspiring?

#9
post #7

I'm an old scientist that did lots of computer simulations that ate up many many cpu cycles. I started with BASIC in the 70s, then learned machine language, and used Fortran throughout the 80s. My simulation programs ran for 24 hours or more. Once I learned C, the concepts of structures and pointers were tremendously useful for storing and passing information. I don't believe any other language could be as efficient…

That’s deeply encouraging to hear — thank you.

I often doubt myself when I see all the modern hate for C, but hearing from someone who used it when cycles mattered…

That means a lot.

I hope to earn that same kind of precision.

Re: Ask HN: Why do so many developers dislike C when I find it inspiring?

#10
post #2

For simple things I also like shell scripts. But for bigger more complex systems, especially with long life-times, many users and many developers, the sharp edges get too dangerous. In those case I move to Java or at least something with stronger typing, and less chance of memory management errors. My last big project was 100kloc C/C++ in a radiator valve though. Not many languages with a run-time would have fit in t…

I think that's the beauty of C — it lets you fit logic into 32kB without screaming. For me it's not about "modern safety" — it's about knowing that every byte is mine. But yeah, I get the tradeoff when you’ve got teams, timelines and a JVM.

BTW you can get very close to the metal in Java too if you are so inclined - I was part of a team doing high-speed trading with microseconds timing and minimal GC in Java. A very few 'unsafe' lines made that possible (but also the possibility to crash the JVM far far faster than it could exit otherwise!)...
Post reply on HN