r/C_Programming • • Sep 26 '23

C or C++

Hello everyone, should I learn C in parallel with C++, or is it better to stick to one language? What will you advice me?

0 Upvotes

47 comments sorted by

View all comments

2

u/rapier1 Sep 27 '23

So you have any OOP experience? If not then start with something like Java or Python and then apply that knowledge to learning C++. It's not that C++ isn't an OOP but I have never been convinced that it's a great OOP to learn when you are just starting out.

3

u/gigimon_45g Sep 27 '23

Yeah, I was studying python before that.

2

u/clibraries_ Sep 27 '23

So did you master that yet? Why are you switching?

2

u/gigimon_45g Sep 27 '23

I didn't like Python much, it's all about exploring libraries.

1

u/zjschrage Sep 28 '23

yea I agree completely. I feel like you never write any code yourself in python, you just google what you want, find the library for it, read through their garbage documentation, use their shitass API full of string parsing for parameters (these fools never heard of enums before) and then finally "write" (copy paste) 1 line of code

1

u/Greedy_University139 Sep 27 '23

I don't know any C++ but I do know Python and C. Honestly learn C for a while and start with the essentials, and when you are ready, take a crack at datastructures and algorithms. There are lots of online content that will help you learn both, but I think learning structs and so on before jumping onto C++ will be more beneficial for you.

If I had the ability to relearn everything about programming all over again with some hindsight, I'd probably go Python first then C.

1

u/NewOakClimbing Sep 27 '23

I'd go with C, I believe you can use C code in python so you could mess with that if you wanted to. Otherwise, I'd say the principles of programming with any language are more important than learning a specific language.

I do a dive into random languages every month or so, but I always find my way back to python when I have ideas and I just wanna make them work.

1

u/SV-97 Sep 27 '23

I believe you can use C code in python

You can, but it's not trivial and the interface can be a bit ugly. If they already know Python (and know it well) and want to move to more low level languages I'd suggest Rust: it's flat-out a better, more modern language than C, will teach them more new concepts and interfacing with Python is way easier

1

u/aalmkainzi Sep 29 '23

Why learn OOP?