Hacker News new | past | comments | ask | show | jobs | submit login

I think C is misleadingly easy: it's easy to reason about, say, a single function body since there's only so many things you can even write in C.

But when you start composing things together and juggling the lifetimes of various things, the complexity balloons and it becomes a lot harder to understand "spooky action at a distance"-type things. You might argue that with good structure and discipline it's still not difficult, but the assumptions are all implicit and you have to get into the mind of whoever wrote it in the first place to understand it. And I write a lot of C and still find it tricky when I have to go look at some random C codebase!




> I write a lot of C and still find it tricky when I have to go look at some random C codebase

Absolutely. C Code is not necessarily easy to understand. Not at all.

But the C parts itself are? In C you seldom wonder what C does, you wonder what the C code does.

If you work like OP likes, single person projects, small enough to keep almost completely in your head, I can see how C is especially charming. You never wrangle with C, only with your own code.


I agree, but what I said has very little to do with that. What you says means that poorly written code has unexpected bugs. But you understand what it does, easily.


If the bugs are unexpected then it's hard to understand what it does :-)


Isn't it more like, you understand the tiny portion of the source code easily, that fits on the screen/in your head?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: