Ask HN: Is it worth it to learn C to better understand Python?
31–40 of 93 posts
Re: Ask HN: Is it worth it to learn C to better understand Python?
#32Do we need to learn assembler to understand C well enough? That’s a litmus test for this question.
Whether it is true for C and Python I don't really have an opinion.
Re: Ask HN: Is it worth it to learn C to better understand Python?
#33Re: Ask HN: Is it worth it to learn C to better understand Python?
#34Re: Ask HN: Is it worth it to learn C to better understand Python?
#35You won't just get better at python, you'll get better at pretty much anything involving programming or understanding how a computer works.
I've seen a lot of people say that if you learn C well, you're basically employable for the next 30 years. I think I agree with that.
Re: Ask HN: Is it worth it to learn C to better understand Python?
#36You could take weeks 1-5 of CS50 [1] to learn enough C to get by. The course continues from week 6 with Python so it’s the perfect intro.
Re: Ask HN: Is it worth it to learn C to better understand Python?
#37In 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…
>when you only need to write two curly braces to create a “dictionary” (of course behind the scenes this is a hash table) many of the nuances of that data structure are hidden from you. You have no idea that accesses are on average O(1) but worst case are O(n). Well, that is wrong. Single value accesses are O(1) amortized. Also, Java is a lower level language but I don’t think simply programming in Java instead teach…
I suppose that’s also fair. I would say that Java at least makes you aware that there is magic afoot. You have to explicitly write that you’d like to use a HashMap, at which point someone writing or reading the code might wonder “what’s that?” Instead, python hides behind the abstraction of a “dictionary” when it should be in my opinion broadcasted from the high heavens that this is a hash map in disguise.
As far as the remainder of your comment, I agree wholeheartedly. Learn computer science. It makes you a better programmer.
Re: Ask HN: Is it worth it to learn C to better understand Python?
#38Re: Ask HN: Is it worth it to learn C to better understand Python?
#39I learned C and have worked with C++ professionally in the past and that knowledge doesn't help at all with understanding what Python is doing internally. Sure, CPython is written in C, but that fact doesn't tell you anything about the details of how it's implemented or what it does when it runs.
Re: Ask HN: Is it worth it to learn C to better understand Python?
#40Do we need to learn assembler to understand C well enough? That’s a litmus test for this question.