Live data from Hacker News

Why Learn to Program in C?

philipbuuck.com

121–123 of 123 posts

Re: Why Learn to Program in C?

#121
post #85

Earlier quoted context omitted.

>How many of you started learning natural numbers not from counting fruits/blocks/candies, but from the ZF set theory axioms Ha ha, good one. I don't even know what the ZF set theory is. Not putting down theory either in general or in this case, of course.

Zermelo-Fraenkel set theory, an axiomatic set theory that basically forms a logical "foundation" for math. I think this comparison of counting blocks to zf set theory is super hyperbolic and not accurate though.

It is a hyperbolic, but not far from "Python is magic, C is real programming". (It would be more like "Python is magic, Turing machine is real programming".)

Re: Why Learn to Program in C?

#122

Earlier quoted context omitted.

Learning to program is about solving problems using a computer. Any programming language allows this, however some languages make it harder than others, and C is in that category. A language like Python has very little quirks that will stump a person coding for the first time in their life; in C they'll wonder "what does int main(int argc, char argv) mean?", "why is there a & before my variable in a scanf but not in…

>> A language like Python has very little quirks that will stump a person coding for the first time in their life Python is great but some of the things I've come across: Why do some keywords use parenthesis and others don't? What's this Python 2/3 hubbub all about? What are __INIT__ and __MAIN__? Why do I see single, double, and triple quoted strings? What does the u prefix mean in u"Hello World"?

Well sure, every language has its quirks, but those last four aren't going to show up unless the person starts diving into an existing codebase, which shouldn't happen if they're still learning. The keys/parenthesis bit I will concede is a bit of a problem.

Re: Why Learn to Program in C?

#123

Earlier quoted context omitted.

> I can't understand why people would be doing serious work in an interpreted language. I detest garbage collection as I have no control over it. You have no control over C's register allocator. (Well, very little, `register` doesn't mean much.) Assuming you use it, you have no control over how the standard library's malloc() and free() work. malloc() could be best-fit, first-fit, something else entirely, who knows.…

Yes, but interpreted is slow, and garbage collection causes pauses at essentially random times. These things are fine for one off sorts of problems where it doesn't matter much if it takes a little longer. If you are writing an application that is meant to be run thousands or millions of times, I start to wonder why people don't care more about these trade-offs (the answer is, of course, they do . . . if they are, fo…

> My point isn't/wasn't so much to crap on other languages, but to express dismay at why people crap on C so much or view it as irrelevant.

Well... you did kind of just crap on other languages.

Personally, I like C, C++, Java, Ruby, JS, and lots of other languages, all for different purposes. I don't feel dismay when people use GC languages, or when they use languages that make it easy to have buffer overflows or security bugs.

I just get dismayed when they use them for the wrong kinds of programs.

Post reply on HN