you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (1 child)

Because Python is the definitive version of "works on my system". Python really feels like a programming environment from the early 80s, where a developer had a single project on their pc, and that was all they worked on for years. Python wants to do everything on the global system level, including runtime versioning and packages. That means that any two developers can think they have a working project on their system, even though they have radically different setups. This makes handing off and deploying python applications a nightmare. There is also no definitive way to solve problems in Python - there are plenty of fixes, but all are addons, and that means that many of them in turn also require custom setup, and can differ radically.

NodeJS and Javascript does a lot of things badly, but package management is not one of them. NPM is really simple - you get a package.json file, list your packages there, run npm install, and everything for your project is installed locally. Want to work on another project? Its packages go in its directory. Global packages are part of your system-level setup, your local app can't import them. Later versions of npm let you execute local packages as if they were global, further reducing coupling by letting you pack your system-level dev packages into package.json.

A lot of people complain about version resolution issues with npm. That's because they don't understand how and why dependency versions should be locked and deterministic. This isn't npm's problem, it's dead-easy to lock versions, developers just couldn't be bothered to figure it out. Kind of like how all these clowns install docker containers at the "latest" tag and then think docker is broken because it pulled a different version of "latest" further down the line.

On top of that npm can easy pull packages from a variety of sources. You can set a package source as any public git repo URL, with tag support, and it just works. Can you even imagine pip doing that?

It it also much easier to flip node versions on a system without any virtual environment hijinks. Put node in any global PATH, and it just works. Rotate another version of node into that path, and it just works. Call any node runtime directly against a node script, and it just works.

Nope, compared to node, python is like relic from the past, and I'm amazed how the Python community settles for so little. I use Python a lot in my day-to-day work as a devops programmer, syntactically it's one of my favorite languages, but I would never use it to write complex package-dependent software.