My Nits with Python

Disclaimer: I love Python. I've been using it on-and-off since 2001, and it's my goto language for prototyping. However, over the years, i've gotten tired of some of the accumulated baggage.

My nits with Python:

  • AsyncIO is a complete disaster. You've reinvented tornado. and tornado reinvented Twisted. It all ends up in terrible code (much like javascript without promises). (Why not just use gevent and forget about it?)

  • No Standard Macro Facility: If you had this, python would be as powerful as Lisp. Alas, the pythonic way is to use decorators.

  • Decorators are hard to reason about: There are actually TWO types of decorators in python, and they work slightly differently. If you code it without arguments it's one way, and if you take arguments, it works another way. This is a cognitive load on the programmers brain that is completely unnecessary. No args should be the same as zero args.

  • Decorators don't stack well: One decorator is "cool". two works too, just make sure they're in the right order. three or more? now you're in a place where the stack trace will confuse anyone except the authors of the original decorators.

  • Metaprogramming/New Style Classes: MRO was a valiant attempt to add something CLOS-like to the python object structure. If you've ever used it, you know that one wrong move, and it does the wrong thing. Usually when you go down this road, you end up regretting it.

  • Python2/3: This split makes Python look completely schizophrenic, even to veterans. Now testing is doubled if you care. I understand the reasoning but it reminds me too much of Perl6 (is that even out yet? Does anyone care? (no) It's the Chinese Democracy of languages)

It just seems to me that python could have taken over the web world, but it got too complex, and now Node is eating its lunch in terms of usage.

Maybe it's a natural evolution of any language that gets "too" popular, but it makes me sad :(

Guido, are you listening?