I heard C++ and Java was the biggest high level programming language. |
"Biggest"?
Things I dislike about Python:
Horrible documentation
The types that functions expect is very poorly documented, as the performance characteristics of built-in containers. For example, if you read any C++ documentation, you can know that std::vector has amortized O(n) append and O(1) lookup, while std::map has O(log n) insert, O(log n) lookup, and O(n log n) traversal.
This information is not documented for Python's lists, dictionaries, etc. It's a small thing, but it makes it so much harder to predict the behavior of a piece of code.
Dynamically typed
Python's horrible documentation is compounded with it not being statically typed. A static language can get away with lackluster documentation because function declarations convey information about the parameters (as long as the developer wasn't being cute with the types as in
MakeSnafucated(object a, object b)
). Even if you aren't very familiar with a statically typed codebase, you can sort of figure it out by following the types involved. Dynamic typing offers no such mercy.
To make matters worse, IDEs for dynamically typed languages are generally unhelpful because no type information exists at development time. At best you'll get autocomplete, but that's about it. You can forget about useful refactoring functionality like in C# and Java IDEs.
Version confusion
A few years ago version 3.0 of the language was released, which broke compatibility with code written for the 2.x series. To this day there's still new code being written for the 2.x series, because of how messy the transition was/is. Even if you yourself wanted to write in 3.x, you had no way of knowing if some library you might need later used 2.x.
In my opinion this debacle hurt adoption so much that Python's eventual fall to irrelevance will be traceable to it. Before 3.0 adoption was exploding; 3.0 totally killed that momentum, and now it's basically stagnating.
Horrible performance
There are alternative implementations, but it's a disgrace that after what, 15-20 years, basically no improvements have been made to the reference implementation in terms of performance. It makes the language practically unusable except to write glue code (to pass data around between libraries written in other languages). If you need to do anything even approaching non-trivial, you can expect the performance to degrade the more code you write in Python.
No threads
The way Python is designed internally means that it's impossible to run code in parallel. Oh, the standard library does have a thread object that (IIRC) maps to system threads, but the interpreter will still lock the threads so that at most only one of them is running at any time. While computer architectures have been steadily moving towards more parallelism since the mid-2000s, Python has mechanisms in place that
guarantee seriality.
(Yes, you can do process-level parallelism, but then you have to waste time with IPC.)
Honestly, I see no point in using Python for anything. Even for scripting/automation, I can write something in a tenth of the time in C#, simply because C# IDEs are so much better than Python IDEs. And after I write I can run it secure in the knowledge that it's not going to crash six months from now because of a type error, or a mistyped variable name.