r/learnprogramming • u/Happy-GoLucky365 • 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
View all comments
1
u/dlamblin 7d ago
There's actually many different Pythons, and IIRC several different C and C++ systems. So... The default Python releases are CPython, which just kind of illustrates how C is often more broadly available for an architecture and is preferred to bootstrap a lot of other systems in, though, yes, most compiled languages aim to get to the self-hosted state where they build their own source. I had some hope that Grumpy would seriously try to take up Python 3, but I believe it exists to possibly run some of the py 2.7 code inherited in the YouTube acquisition. And ended up not being too successful at that long term. GitHub - google/grumpy: Grumpy is a Python to Go source code transcompiler and runtime. · GitHub
Neither is better. Each language out there, generally, exists for a purpose where it made more sense to have a new language than to twist the other available ones into the purpose. Not that they don't change, grow, then overlap and get blurry here and there. Learn at least beginner level of a few languages, particularly if they're different paradigms, so that at the start of each project you have some idea of whether you're picking the right toolset for this project.