Fuck Python

Alex Mills
Sep 5, 2018 · 2 min read

I have never really used Python, and I probably will have to learn it someday. Below I list some shortcomings and compare them to JavaScript. The problems with Python that I fear I will have to wrangle with:

  • Scoping — having to use nonlocal to scope closures. JavaScript does not have this problem, JS is nice and smooth in this regard, scope is “linear”.
  • Variables don’t get declared, it’s hard to tell when a variable was initialized or reinitialized/overwritten. JS does not have this problem — JS has const and let and var. “I hate that Python can’t distinguish between declaration and usage of a variable.” “Nothing in Python prevents me form overwriting or reusing variables.”
  • Python version 2 or 3, which to use?
  • the GIL — the Global Interpreter Lock — JavaScript avoids this problem by being “single-threaded”
  • JavaScript/V8 runs faster than Python, around 5–10x, Python is one of the slowest languages around.
  • whitespace for syntax — also known as the “offsides r ule”— fuck every single programming language that utilizes whitespace for syntax (including YAML) and fuck the authors of those systems as well. JS does not suffer from issues relating to this horrible design choice.
  • Object Orientation was tacked on — passing ‘self’ to methods? wtf. it’s actually not that bad from a developer perspective, but I assume performance is bad since all the methods need to bound to each instance, every time an instance of a class is created?
  • Python is dynamically typed — that’s a major downside for most real applications. Obviously a problem that JS has as well, that only TypeScript can fix.
  • No support for multi-line anonymous functions.
  • Swallows errors — at least Python3 — I am looking a python program right now — program will exit even though there is clearly an error but no error trace shows up — I am not swallowing the error with a try/catch, python is swallowing it, and that’s not good.
  • Python error stack traces — they are horrible, I don’t think it’s a matter of getting used to — they are just really painstaking to sift through.

Alex Mills

Written by

Programmer. Soccer, bicycle, and 90's hip hop enthusiast. Likes movies about music, stand-up comedy. Pronounces LaTeX latex and Technics technicks.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade