Menu Close

Articles

Criticism for Python

Python’s a great language, but there are some problems with it:

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 default implementation uses a global interpreter lock (GIL). This makes multi-threaded code run less efficiently,
10. Python use keyword “def” to create a method or function. I mean: really? 

The problem is not that Python has problems. It is that people start to use python for large projects. Python is a scripting language.   If you have learned python already use it only for small, quick projects.

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