Live data from Hacker News

Ask HN: Is it worth it to learn C to better understand Python?

news.ycombinator.com

11–20 of 93 posts

Re: Ask HN: Is it worth it to learn C to better understand Python?

#11
Think about how many fundamental Linux programs are still done in C. Yes. 100%. Knowing C well helps you in any higher level language. In your mind you’ll be able to think what is really happening under the abstraction that is python. (Or ruby or Java etc)

Re: Ask HN: Is it worth it to learn C to better understand Python?

#12
Yes. Learn C.

Not to understand python, but to become a better programmer and gain a better understanding of computers.

We desperately need more people learning the 'hard' languages. Python is fun, but libssl, libcurl, the Linux kernel, and all the other 'important' things need more developers.

Re: Ask HN: Is it worth it to learn C to better understand Python?

#15
post #9

In college I used to tutor students in computer science. Mid-way through my college career my school switched the curriculum to teach Python instead of Java. I found that the students who took Python lacked what I considered a basic appreciation for and understanding of how the language actually ‘does’ something. For instance, when you only need to write two curly braces to create a “dictionary” (of course behind the…

There are certainly some advantages to be gained from greater mechanical sympathy and an appreciation of static types. However, in the modern day, I wouldn't suggest a Python programmer learn C to achieve either of these things.

For a Python programmer who just wants to learn about static type systems, learn Typescript.

For a Python programmer who wants to learn about static type systems and mess around with pointers, learn Go.

For a Python programmer who really wants to get elbow-deep in a natively-compiled language with a fairly sophisticated type system, learn Rust.

For someone who doesn't want to actually use C and just wants to learn concepts, C doesn't really have any advantages these days. Its type system is anemic, its compilers are unhelpful, its abstractive capabilities are poor and leaky, and its claims of being close-to-the-metal are overblown on modern processors. There are plenty of good reasons to learn C, but IMO "to become a better Python programmer" is not one of them.

Re: Ask HN: Is it worth it to learn C to better understand Python?

#16
post #15
post #9

In college I used to tutor students in computer science. Mid-way through my college career my school switched the curriculum to teach Python instead of Java. I found that the students who took Python lacked what I considered a basic appreciation for and understanding of how the language actually ‘does’ something. For instance, when you only need to write two curly braces to create a “dictionary” (of course behind the…

There are certainly some advantages to be gained from greater mechanical sympathy and an appreciation of static types. However, in the modern day, I wouldn't suggest a Python programmer learn C to achieve either of these things. For a Python programmer who just wants to learn about static type systems, learn Typescript. For a Python programmer who wants to learn about static type systems and mess around with pointers…

Those are all vastly more complicated than C. And on top of that you have to learn three instead of just one!

(Imagine trying to learn Rust without experience with C. Oh man.)

Post reply on HN