News for hackers. Stuff that matters.
Re:Python Is Eating the World by atoav on Monday August 12, 2019 @12:34AM (#20672439)
> Dependency hell is everywhere.

Excuse me, but as a long time Python user I have to disagree. I started using Rust two years ago and Rust’s dependency managment is easily the best thing I ever saw (keep in mind that I didn’t see everything, so there is a chance there are better things out there).

The project-/dependency-manager Cargo¹ is more “pythonic” than anything Python ever came up with and where others mumbled ”dependency hell is everywhere” the Rust people seem to have thought something like: ”there must be a way to do this properly”.

The whole thing gives me hope for Python, but angers me everytime I start a new python project. Poetry is good, but there should be an official way to do this.

It saddens me to see, that some people seem to just have given up on dependency managment alltogether and declared it unsolvable (which it is not, and probably never has been).

¹: https://doc.rust-lang.org/cargo/index.html

Re:Python Is Eating the World by jnwatson on Monday August 12, 2019 @12:46AM (#20672496)
There's a pattern to this. The later the dependency manager was created, the better it is. This is a hard problem space where each new language got to use the lessons learned on the earlier ones.

Cargo, though, has a silver bullet. If it can't find a solution to determine a single version for a package, it simply includes more than one version in the object code. That would take a lot of work to duplicate in Python.

Re:Python Is Eating the World by icebraining on Monday August 12, 2019 @04:14AM (#20673503)
Python has had multi-version installation of libraries for a long time: https://packaging.python.org/guides/multi-version-installs/

Unfortunately, pip came along and took over, despite lacking support for that. It would have been nice if a better packaging tool had replaced easy_install, but alas.

Re:Python Is Eating the World by irishsultan on Monday August 12, 2019 @06:19AM (#20674077)
That only helps when installing multiple versions at the same time, it doesn't help with using multiple versions in the same application.
Re:Python Is Eating the World by heavenlyblue on Tuesday August 13, 2019 @06:38AM (#20684356)
Yeah, and the compiler will also report errors if different modules use different versions of the same package.

  - module A uses v1 and uses trait v1.A 
  - module B uses v2 and uses trait v2.A
  - will be reported as "A does not implement trait A"
It's actually quite discomforting for newcomers.
Re:Python Is Eating the World by atoav on Monday August 12, 2019 @02:18AM (#20672896)
They definitly gave this a thought while designing the library system (”crates”) for the language. I am not sure if it is feasible to retrofit such a solution to something like python.. Python 4 maybe?