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

67 Upvotes

184 comments sorted by

View all comments

Show parent comment

1

u/GarThor_TMK 3d ago

That seems to be philluminatis only metric...

Write once, run once, keep the results, toss everything you did to get the results.

For this, Python excels...

For anything else, it's a wasteful and unoptimized way to run your code.

0

u/moratnz 2d ago

Though much of the time the waste and lack of optimisation is irrelevant.

If C delivers the result in a microsecond and python delivers it in a millisecond then C is a thousand times faster, and for low-scale applications that thousandfold speed difference is completely irrelevant, meaning python's ease of maintenance makes it strictly superior.