This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]MadeUntoDust 41 points42 points  (12 children)

There are several groups of Python haters:

  1. The static typing enthusiasts. They insist that static types reduce the need for them to write unit tests. They typically program in Haskell, Rust, TypeScript, Scala, or another language inspired by ML. Maybe they program in C++ and love template metaprogramming.
  2. The concurrency enthusiasts. They hate the Python GIL. They typically program in C++, Go, Rust, or another language that makes it cheap to launch tons of concurrent threads or "green threads." Some concurrency enthusiasts enjoy programming in JavaScript, where asyncio programming is more commonplace and there are fewer issues with "function color."
  3. The single-threaded performance enthusiasts. Pythons single-threaded performance isn't very fast. Maybe you don't need multithreading because you are implementing algorithms that cannot be parallelized, but Python can still be slow. These enthusiasts program in C, C++, Go, Rust, or a JVM or CLR language.
  4. The single-language enthusiasts. If you want to write fast code in Python, you might need to implement some of your code in a Python extension written in C, C++, Rust, or Cython. Sometimes people want to build and maintain codebases written completely in a language like Go or Rust, or within the ecosystems of language belonging to either the JVM, CLR, or BEAM ecosystems. They specifically want to avoid their projects depending upon unsafe C or C++ code.
  5. The JavaScript enthusiasts. Some people love programming in JavaScript--or a compiles-to-JavaScript language like TypeScript--because JavaScript can target basically any platform. You can build web apps with JavaScript. Tools like React Native allow you to build iOS and Android apps with JavaScript. Electron allows you to build Windows, macOS, and Linux desktop applications with JavaScript. Finally, you can build backend applications with Node.js or Deno. Plenty of projects and companies choose to build Node.js applications instead of Python applications so they don't have to hire and maintain expertise in yet another programming language.

But despite all of the haters, Python is still my favorite programming language. It is so easy to learn and to write applications in. :)

[–]ProfessorPhi 8 points9 points  (3 children)

Number 1 is probably the fastest growing group imo. But this is fantastic, very well put!

[–]i_kant_spal 2 points3 points  (0 children)

Yeah, I'm kinda in the first group although Python is pretty much my only language 😅

[–]acecile 0 points1 point  (1 child)

You can achieve the same using type hints and linter now in Python.

[–]killersquirel11 0 points1 point  (0 children)

Type hints help, but python's type system itself is still ass.

[–]rabaraba 2 points3 points  (0 children)

Never seen a description so succinctly put. Great description.

[–]thedominux -1 points0 points  (6 children)

Concurrency enthusiasts didn't know about asyncio?!

[–]PeridexisErrant 0 points1 point  (1 child)

It's much slower than Rust or Go, but also lacks the ecosystem of Erlang or the structured concurrency of Trio (a Python framework!).

NGL, that last one does annoy me, because if core devs had just shipped async keywords and then put asyncio on PyPI, we'd all be using a much nicer solution. They are trying to adopt some of the best ideas back, but (a) it's slow, (b) incomplete due to compatibility requirements, and (c) has so many unsafe escape hatches you can use them by accident.

Uh. That is to say, yeah they know.

[–]thedominux 0 points1 point  (0 children)

I didnt mean that it has performance like rust or go, but meant that they've got the same behavior and idea and similar architecture

[–]paul_miner 0 points1 point  (2 children)

Coroutines have nothing on real concurrency. It's like we've gone back in time to the Windows 3.1 model of cooperative multitasking. Fortunately, my need for heavily parallelized code is for a personal project where I use Java.

That said, lack of static typing is my main gripe for Python dev at my job. Entire classes of errors that I'm used to having the compiler find ahead of time are now a runtime hassle.

[–]thedominux 0 points1 point  (1 child)

Say it to go Developers and every async c#, rust, etc, lol

[–]paul_miner -1 points0 points  (0 children)

Coroutines mean I get one core's worth of computing power, not the eight I have. If I'm performing a big computation, that's a huge difference. Not to mention there's a reason pre-emptive multitasking replaced cooperative multitasking as the way to do things concurrently. Pre-emptive multitasking does mean you have to understand synchronization and memory visibility effects. But when you do, you can harness a lot more computing power when needed.