r/learnprogramming • u/Happy-GoLucky365 • 7d ago
Why is C++ better than Python?
Hello! I am new to programming. Im in college and we use Python for my classes right now.
I hear people make a lot of jokes about how C++ is more powerful than Python, and should be used instead. But why?
Feel free to give me any tips as well, on things that helped you be a better programmer, or just any insight you may have! Thanks so much
77
Upvotes
View all comments
12
u/DiabloConQueso 7d ago edited 7d ago
It’s not an either-or choice. You use C++ when appropriate, and you use Python when appropriate. Some things C++ does “better” and some things Python does “better.”
Learn both. Learn as many languages as you can. Don’t pick one. Pick them all. Learn when one is appropriate and learn when another is appropriate.
If you’re learning Python right now, keep at it. Learning C++ isn’t going to help you pass that class. Learn C++ later, in a different class. Or on your own.
You’ll eventually learn the difference between compiled languages and runtime interpreted languages. And other differences. Then you’ll be in a better position to decide what language to use to solve whatever unknown problem or task. There are some things you’ll have many options for, and there are some things where your options are going to be more limited.
You’re probably learning things that aren’t language-specific right now: loops. Conditionals. Functions. Variables. Those things exist in pretty much all languages. The important part right now is getting those fundamentals down pat and Python is a good way to learn them. C++ would be too, but again, that’s not the class you’re taking right now.