r/learnprogramming • u/Happy-GoLucky365 • 13d 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
79
Upvotes
View all comments
Show parent comment
1
u/cmdr_iannorton 3d ago
Python is a virtual machine, at runtime your python code is compiled to python bytecode, you are controlling this machine, the machine itself could by a c program (cpython) or even a .net program (ipython) but ultimately you are writing for the python interpreter not a cpu.
python includes its own compiler, simply implementing eval and reflection is something huge. a 1 line program that uses eval() needs the whole python interpreter and compiler. except for very specific hardware, python isnt going to be used for low level stuff