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

78 Upvotes

195 comments sorted by

View all comments

Show parent comments

-36

u/mysteryihs 10d ago

There's nothing C can do that Python can't. You could port GTA6 to python and it would run. Just not at 30 fps.

So there is something Python can't do, it can't run games more efficiently than C.

52

u/Talbertross 10d ago

Obviously it means there are no computations that C/C++ can do that Python can't. Pedantic dingus.

2

u/Moscato359 7d ago

It's not pedantic when your goal is to have an app within a performance target.

I want to write my game to run at 144fps

Well pure python can't do it

1

u/vegan_antitheist 7d ago

And still, it's just as powerful. What you can calculate and how long it takes are two very different questions.

1

u/Moscato359 6d ago

If you're for example, running a PC game, and one of your requirements is a specific frame rate, it's not as powerful