Hacker News new | ask | show | jobs
by zerohp 1322 days ago
Most of the hate comes from people that have never written a line of C in their professional life.
2 comments

I didnt hate C until Ive been moved to C world and realized how basic things in other langs arent trivial in C
I had the exact opposite experience, starting out mostly coding in high level languages moving to C as the language I use day-to-day I realized how incredibly limited I was by the abstractions I was saddled with.
This didn't make me hate C, but it did make me appreciate every other language.

The spartan nature of the language itself, and all of the inevitable difficulties around linking has really made nearly everything else seem so much more simple.

Using nice string and algorithm libraries helps a lot without introducing all the craziness of cpp.

You can also do zig style memory management (ex: allocator pools per request etc) which helps.

There's something to be said for making it at least a little painful to e.g. concat strings in a loop or swap an integer value in an array for 500KB of raw JSON.
IMO this is not hating C the language, but C the platform. Every OS and non-C language has to deal with that.
The reason C is everywhere is because it doesn't define a platform. The OS/hardware makers define it.

Lack of a platform is a strength.