3 ms·
I used to think that, end then I just realized that this is really just Python showing its roots as a relatively old programming language with Unix roots. C an
by mumblemumble 7y ago
I used to think that, end then I just realized that this is really just Python showing its roots as a relatively old programming language with Unix roots.
C and C++ have a a fairly similar problem with dependency hell due to shared libraries being installed in a single system-wide location. They have their own hacks for getting dealing with it. I don't know which way of doing it is technically superior, all I know is none of them offer a developer experience that I'd choose for myself if I were designing a new programming language in this day and age.
FWIW, I give Python some credit for coming up with a solution that doesn't rely on containerization, and therefore will work consistently on many OSes, and not just Linux. Containerization is an option, too. It's really down to whether you need a system that works for one language on many OSes, or one that works for many languages on one OS.
Or, if you'd rather keep it really simple, there are zipapps, which are Python's answer to fat binaries. Similar to uberjars in Java. Or to good ol' static compilation in most the languages I like to use even when someone isn't paying me to do it.
(That said, there is one thing about environment management in Python that absolutely drives me up the wall: There are more than a fistful of competing tools for doing it, and a zillion different ways to work with them, and no clear preferred way. Which sucks for everyone, and makes learning the ropes without a good mentor way more of a chore than it needs to be. That's not too far off from C, either, though.)
- skohan 7y ago> There are more than a fistful of competing tools for doing it, and a zillion different ways to work with them, and no clear preferred way Yeah I guess this is really my main issue. Like it seems like every Python project needs to come with a README to explain which tools are required, and maybe even which order they have to be applied to get the desired result. It just feels like an almost absurd step back when compared to other language ecosystems where these are well-solved problems.
- qqssccfftt 7y ago> There are more than a fistful of competing tools for doing it, and a zillion different ways to work with them, and no clear preferred way. Generally, newer projects are settling around Poetry.
- deleted 7y ago[deleted]
- newen 7y agoThere is a good chance it will be something else in a few months.
- qqssccfftt 7y agoIt's stuck around for the last year. Pyproject.toml is standardised.
- im3w1l 7y agoC and C++ dependency hell comes from prioritizing user experience over dev experience. Imagine if every little tool you used shipped a full fledged system running in a docker container. It would be a nightmare. As a user it's possible to put up with this, even enjoy it, when there are a handful of tools using it. A container running your webserver and its dependencies like database and caching for instance, that's reasonable.