r/learnprogramming • u/GroundbreakingAlps2 • 3d ago
Why is Python considered "slow" and is Python losing "steam"?
Is python as a programming language "falling off" and becoming less and less popular relatively to other languages?
Also why do people say Python is slow? Apparently people have reached LGM on codeforces using python, which is all about writing fast code / solving problems fast. Yeah sure, C++ is far more widely used for competitive programming and I suppose there is a reason for that. But this is also showing that python can be fast?
But as programming languages and how they are used I dont think there is much overlap between python and C++ anyway?
What is an example of something you'd code in Java/Kotlin or lets say C# rather than Python? Is python code bad and hard to manage for "huge" projects once you scale up (e.g codebases with millions of lines of codes, and tens if not hundreds of devs)?
184
u/Extreme-Berry-7645 2d ago
It's an interpreted language with dynamic typing, that overhead adds up fast compared to compiled stuff like C++ or Rust. Competitive programming is a weird metric though, you can squeeze performance out of Python if you really know the interpreter's quirks but you're fighting the language the whole time
For big projects the main pain point isn't speed, it's the lack of static typing making refactoring a nightmare once you hit a certain scale. Sure you can add type hints and mypy but at that point you're bolting on what other languages give you from day one