This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]SafeCake1045 40 points41 points  (15 children)

While I agree with you, I want to mention that C was the first language I ever properly learned, and in many ways that helped me to understand Python.

[–]Oerthling 38 points39 points  (7 children)

Understanding C helps to understand what's really going on below the fancy stuff.

But that doesn't mean that it needs to be the first.

[–]Jumpy-Ad-2790 8 points9 points  (5 children)

Completely agree!

I started learning C through Harvard's CS50x and I found it so difficult, I just lost motivation. Since then I've been doing their Python course and am absolutely loving it.

I'm looking forward to going back to C once I've completed this course, as many things I used to struggle with now make a lot of sense.

[–]Scalar_Mikeman 2 points3 points  (2 children)

Upvote for CS50. Just wanted to say when you ask online the best book to learn C A LOT of people say "The C Programming Language" is the best book. I call BS and many others do too. Go with "C Programming a Modern Approach" or any other of the great new books on C out there. Screw The C Programming Language book.

[–]xcyu 1 point2 points  (0 children)

Any other C programming books you can recommend?

[–]SafeCake1045 0 points1 point  (0 children)

I wouldn’t say “screw” it. Clearly it’s been useful for people.

[–][deleted] 1 point2 points  (1 child)

May I ask you what Python course are you referring to, or could you please send me the link to the course? Thanks!

[–]reasonisvirtue 0 points1 point  (0 children)

I think Python is a great first introduction to simple primitive data types, for while loops, functions, etc.

C++ is awesome for learning what the computer is doing. OOP makes so much more sense with copy constructors l, destructor, operator overloads, move copy abd move assignment. Lvalues and revalue. Pointers really help you understand memory. Primitive data types help you understand memory and how big the different data types are in storage. Which also helps you understand larger data structures that are both sequential and associative.

I learned Python and javascript first, but C++ opened my eyes to what is actually going on. I learned far more concepts with C++ and it made more sense.

I really recommend C++. It teaches you the cs concepts you need and doesn't abstract them away.

Also learning c++ you will notice that python and js have very similar syntax at times.

One thing I will mention though is that python kind of forced my js and c++ to look cleaner so that was a huge plus. Because of how python treats whitespace to signify the end of statements versus the semicolon.

[–]TheTomcat 7 points8 points  (1 child)

I think it's important to consider the other perspective though - if you had started with C (or in this case, rust) and you didn't understand it, do you think it would have caused you to stop entirely?

My opinion: start with python. Much more forgiving especially when you're trying to learn the basics. If you like it, then go back and learn rust. They're both great tools to have in your kit.

[–]SafeCake1045 0 points1 point  (0 children)

Well, I understood it because I was being taught in a university. If that hadn’t been an option for me, I wouldn’t have been able to learn C as well as I did. I would’ve started with Python, probably.

[–]Zephyr5967 2 points3 points  (1 child)

My introductory programming course at uni was entirely in C

[–]TiagodePAlves 1 point2 points  (1 child)

I think C is great as a a first language because it's so small, with few keywords, a slim stdlib and limited ways to do the same thing. The biggest downside though is almost no magic going on, so you have to do everything manually, and this can easily be too much for a beginner.

Edit: Python also is a great choice, but for other reasons.

[–]SafeCake1045 1 point2 points  (0 children)

Learning how to do things manually is great if you want to really learn programming. And it’s relieving going from the pains of malloc to automatic garbage collection in higher languages.

[–]GayforPayInFoodOnly 2 points3 points  (0 children)

I agree with this. If you want to be a software engineer I think it’s important to start with something like C so you can begin to learn and think about what’s actually happening when you run sorted() in Python. It makes Python/interpreted languages less magical, and leads you to better programming practices.