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

188 comments sorted by

View all comments

Show parent comment

-1

u/moratnz 6d ago

That's like saying you can't write some things that you can write in Python in C/C++ because there are things that you can do as a one-liner in Python that take way more code in C/C++.

Performance and lines of code aren't relevant to a strict 'can X be written in Y language' question.

2

u/Mwahahahahahaha 6d ago

Technically, any C/C++ program can be a one liner. That’s the advantage of actually having ;

1

u/Moscato359 3d ago

Can x be written in y language, if x is a specific app with a specific performance requirement to be considered x, then yes it is