Menu Close

Articles

Criticism for Python

Python’s a great language, however there are some problems with it. Nobody is perfect. Next I try to highlight some of these problems you can avoid after you gain more experience in Python. 

1. Python is slow compared with other languages. This is due to its dynamic typing system,
2. Python is vulnerable to /tab and space indention issues after refactor,
3. Not having static types makes the language vulnerable to bugs,
4. The lack of a switch statement is a common complaint,
5. It lack tail-call recursion optimization,
6. OOP is ugly compared to Java OOP, 
7. Scoping is ugly: using “global” and “nonlocal” keywords is difficult to explain,
8. Error messages are sometimes difficult to grok: “Syntax error”,
9. Python’s multi-threading code is not very efficient due to GIL (Global Interpreter Lock).

Python problems become serious issues when you start using it for larger projects. Python is a scripting language designed for small scripts and quick projects. You suppose to use a more avademic language for larger projects like Java, C++, Julia, Go or Rust.

I have used Python to create a small DSL (language) for test automation. It was a good exercise by I will try to replace it with Go or Rust in my next project. I had too many problems with it. 

Type annotation

Python team has acknowledge that using types is better than not using types at all. So they have introduced “type annotations” to improve “developer experience“. Unfortunately this is not a native solution but a quick fix. Most developers are ignoring it. It does help though if you are using the right IDE editor that understand your annotations. 

That’s all folks. I hope you got fun!