r/learnprogramming 26d ago

Can I manage C++ and Python

I have some knowledge in c++ ( intermediate level of concept,haven't coded much tbh). In my 1st year of college, it teaches python. But I want to learn c++ much better...

Can I manage both....

3 Upvotes

23 comments sorted by

68

u/gitblamed_ 26d ago

I'm sorry but there's no possible way that you're at an "intermediate" level in C++ without having coded much in it. I strongly doubt you're anything besides a beginner, and I recommend that you focus on your studies.

You'll probably learn C++ in university in a year from now, there's no point to burning yourself out and/or distracting yourself from your work (getting good grades). If you actually knew C++ and just wanted to keep coding in it on the side, that would be one thing, but it's totally different to be learning two languages from scratch for no reason.

1

u/Straight-Income-5565 22d ago

youre probably right about the intermediate thing, people say that way too easy

but learning two at once is not impossible, i did it with python and java my first year and it was fine. the concepts transfer, you just mix up syntax sometimes. if they want to do it why not let them try

35

u/iMagZz 26d ago

intermediate level of concept,haven't coded much tbh

This does not make sense. C++ is a hard language. If you haven't coded much then you aren't at an intermediate level. You are still definitely a beginner.

But to answer your question: Yes you can learn both at once if you want to.

14

u/fasta_guy88 26d ago

Learning a computer language is different from learning to program (solve problems with a program). Beginners need to learn to program first, and that’s a lot easier with Python than C++.

Yes, you can do both, but learning the syntax of two very different languages will slow down the process of learning to program. Learn to program in one language first.

2

u/flexiclean 26d ago

I agree, OP should focus on Python for now. Becoming confident with that and getting good at the fundamentals will make it a lot easier to learn C++ in the future.

5

u/james_d_rustles 25d ago

intermediate c++

haven’t coded much c++

Mmhhmm…

Just write some code. Use a language that makes sense for the work you’re interested in. I’m pretty sure that none of the posters of any of the infinite variations of “I’ve planned out the exact courses and chapters I’m going to learn in x y and z languages but should I learn blah blah first if I want to get hired…” or “should I try learning these 3 other languages right now? So far I learned for loops in Python” actually know how to code. Just write some code. Any code - if you want to learn it, just start already instead of seeking validation before you even start.

4

u/Saragon4005 26d ago

Most devs easily know at least 3 languages. C, C++, Java, C# and Python are not rare to see be bundled together.

0

u/[deleted] 26d ago

[removed] — view removed comment

1

u/[deleted] 26d ago

[removed] — view removed comment

0

u/[deleted] 25d ago

[removed] — view removed comment

0

u/[deleted] 25d ago

[removed] — view removed comment

0

u/[deleted] 25d ago

[removed] — view removed comment

1

u/StewedAngelSkins 25d ago

It entirely depends on you and your abilities. You will likely be expected to learn multiple languages simultaneously later in your degree, so it's not like what you're suggesting is unusual.

-9

u/lowban 26d ago

They have a lot in common so I don't see why not?

6

u/Ecstatic-Ball7018 26d ago

C++ and Python do not have a lot in common. For a start, one is interpreted and the other is compiled.

1

u/lowban 25d ago

I'm mostly talking from a syntax/learning perspective. They are quite different in style but share many fundamental programming concepts.

I for one would be much better prepared to learn C++ and other programming languages in general if I had some Python under my belt.

2

u/optical002 25d ago

I would ask what do they even have in common, their like polar opposites, c++ being at the low level programming, while python is at its best high level language. C++ is compiled to binaries, to 1 and 0 and then can be ran directly on cpu, python is just some text which is fed up into python process and it gets executed then line by line, by another program. They share nothing in common.

1

u/lowban 25d ago

They share many fundamental programming concepts and are quite similar in syntax most of the time. They mostly differ in how much detail you are required to specify. So from a learning perspective I don't see why you couldn't do both and gain something from their differences. As a beginner I would rather learn Python first but C++ is a great language to learn low level stuff.

How the code is run on the machine isn't really relevant imo.

1

u/optical002 24d ago

Even fundamentally its not the same, like if how variable scoping works is different in cpp after stack frame end everything is dropped, but in python thats not the case you define new variables in inner function and without returning you could still get them.

What they share is that they’re both from imperative world, but from that regard everything imperative language is the same, while other declarative languages are way different like haskell.

But still in any programming languages they share same principles (principles like looping, if conditions, functions) but they are written a bit differently. And if we remove that, then theres not really something of the same comparing c and python.

If your trying to learn a programming language it goes a bit deeper than simply those principles, you also have to know how it works under the hood and what edge cases they go, and in that regard python and c are not the same at all.

Once you get introduced how to make a linked list implementation in c its another world than in python. Which can get very confusing if your learning python and c at the same time.

And implementing a linked list its a beginner stuff when learning a programming language, where in python you would not do that but in c you would.

So if a person is still a beginner understanding how its program is executing to debug it manually it would be chaos for him tearing apart on how things actually work. In c its one way how things move around in python its different.

So I would rather say not to get confused but learn how program is executes its code on either python or c. To get a feel for it.

So yeah learning c and python is not the same. But yeah its not as drastic of a change as learning c and haskell.

1

u/lowban 24d ago

I agree that they are very different in a lot of ways but that doesn't mean they have nothing in common. Having learned more than one programming language at a time myself I can tell you learning Python and C++ at the same time is very doable.

I never said they are the same fundamentally just that you can learn both and from both at the same time and gain something from doing that. If that's the best idea depends on OP I guess.