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

12 points by silentpuck ↗ HN
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.

12 comments

[ 0.26 ms ] story [ 14.7 ms ] thread
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.

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?"

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.
I also like C, for reasons you mention. I dislike many of the features of other more modern programming languages (even if they do have some advantages, many of the things they do are not as good in my opinion, so I prefer C programming).
For me it’s because I enjoy building useful things more than I enjoy futzing with the details of code. I could build something useful in C. Or I could spend the same amount of time building a dozen useful things in Python. With the added benefit that they’re less likely to segfault.

WHY does it matter to you to be that close to the machine? For many of us, we value different things. What you perceive as control, we perceive as fussiness.

I have never worked in a legacy C code base, but I could imagine that it might not be a pretty good experience. However, writing low level projects in C just by myself is very interesting.
Exactly. That’s how I feel too — writing small, precise tools in C by myself is strangely rewarding. Thanks for sharing that — it’s good to know others feel it too.
For me, I started with BASIC on various machines, then moved to CP/M, then MS-DOS. I learned Turbo Pascal to be able to maintain a program that talked to a GTEK EPROM burner, and fell in love with the language after a few months.

I stuck with it through the various iterations, right up to the point where Borland's management went insane, and they lost their chief architect to Microsoft. I tried C++ after that, but the amount of boilerplate and cruft compared to Delphi was just unbearable.

Things I personally hate about C include

  * Case Sensitivity
  * NULL terminated strings
  * Macros  (there are usually many skunks worth of code smells compressed into C macros)
  * Pointer syntax that is way to easy to confuse with line noise.
  * Slow, oh so slow compiler/linker cycles
  * Usual association with make
Pascal is faster in compile and runtime. It's smaller, and has almost magical string these days.
All your points are valid. I don't think most people "dislike" C. People have options and most choose non-C. From my perspective, when the software or the system itself is already extremely complex, using C just adds more complexity on top. Many people including me choose not to add more.
It's great when you're in the driver seat. It's not great when they need to launch in 3 months and management throws a bunch of intermediate engineers at you who can't do anything without "type safety".

Software will continue to grow to the point where people move rapidly until they hit a limit. We laugh at future devs being weak, future devs laugh at our tech being unsafe.

I learned to program in C, and even though I use other languages more often these days, I’m very glad C was my starting point.

It forced me to understand memory, resource management, and what actually happens when you call a function or access a variable. No abstractions to hide behind — just the machine and you.

Even now, when performance matters, I often go back to C-level tools and techniques — mmap, manual memory control, system calls — because they give me the precision I need.

More importantly, learning C gave me fundamentals I don’t think you get as deeply with higher-level languages. It made it easier to pick up other languages, not just syntactically, but conceptually. I understand what they abstract away — and at what cost.

C isn’t perfect, and it’s not the right tool for everything. But if you want to understand computers, I still think it’s one of the best places to start.

And like it or not, there are still things that — for legacy, for portability, or for raw control — can only really be done in C.

Its not about disliking C. If I have to build an MVP quickly, I need a higher level language to do some of the heavy lifting for me. Memory management or implementing thread safety is not something I wish to do everyday. Doing so would not pay my bills.