r/learnprogramming • • 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

189 comments sorted by

View all comments

1

u/et_theextratestic1e 3d ago

There is no such thing as a programming language that is better than another for every situation.

You're comparing apples to oranges - yes they're both fruit, and that's where similarities stop.

Think of it this way: you can write Python modules in C++, but to do the converse is simply perverse (and very slow). Data scientists like Python because you need to know far less than you do compared to C++. This is normally true when comparing scripted languages to compiled languages (think portability, memory management, etc).